From f372b7126ab9eac1162065e854b1c6f63d92add0 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Sat, 11 Oct 2014 16:00:37 +0800 Subject: [PATCH] =?UTF-8?q?=E8=80=81=E5=B8=88=E6=89=93=E5=8C=85=E4=B8=8B?= =?UTF-8?q?=E8=BD=BD=E5=A2=9E=E5=8A=A0=E5=BC=82=E5=B8=B8=E6=8D=95=E8=8E=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/zipdown_controller.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/controllers/zipdown_controller.rb b/app/controllers/zipdown_controller.rb index a7d804321..df834f13c 100644 --- a/app/controllers/zipdown_controller.rb +++ b/app/controllers/zipdown_controller.rb @@ -31,7 +31,8 @@ class ZipdownController < ApplicationController end send_file zipfile, :filename => obj.name+".zip", :type => detect_content_type(zipfile) if zipfile - #rescue NameError, ActiveRecord::RecordNotFound => e + rescue Exception => e + render file: 'public/no_file_found.html' , :layout => 'course_base' #logger.error "[ZipDown] ===> #{e}" #@error = e end