diff options
Diffstat (limited to 'app/controllers/versions_controller.rb')
-rw-r--r-- | app/controllers/versions_controller.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/app/controllers/versions_controller.rb b/app/controllers/versions_controller.rb index d1980d74f..5c2dcc7f6 100644 --- a/app/controllers/versions_controller.rb +++ b/app/controllers/versions_controller.rb @@ -39,8 +39,7 @@ class VersionsController < ApplicationController @attachment.increment_download
send_file @attachment.diskfile, :filename => @attachment.filename
rescue
- flash.now[:notice] = l(:notice_file_not_found)
- render :text => "", :layout => true, :status => 404
+ render_404
end
def destroy_file
@@ -53,5 +52,7 @@ private def find_project
@version = Version.find(params[:id])
@project = @version.project
+ rescue ActiveRecord::RecordNotFound
+ render_404
end end |