优化代码

This commit is contained in:
sw 2014-09-12 14:31:42 +08:00
parent ff11e4b323
commit 05f1df1922
1 changed files with 2 additions and 2 deletions

View File

@ -82,10 +82,10 @@ class ZipdownController < ApplicationController
user_zip_paths = homeattaches.map do |homeattach|
if homeattach.attachments.count > 0
zip_homework_by_user homeattach
has_file = true if has_file == false
has_file = true unless has_file
end
end
if has_file == false
unless has_file
render file: 'public/no_file_fond.html' , :layout => 'course_base'
end
zipping "#{Time.now.to_i}_#{bid.name}.zip", user_zip_paths, OUTPUT_FOLDER