From 05f1df1922f7c96b5995bf1339e2b592e4eb974c Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Fri, 12 Sep 2014 14:31:42 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/zipdown_controller.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/zipdown_controller.rb b/app/controllers/zipdown_controller.rb index cb4ab3c7a..e57a2c59a 100644 --- a/app/controllers/zipdown_controller.rb +++ b/app/controllers/zipdown_controller.rb @@ -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