diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2011-11-30 19:02:40 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2011-11-30 19:02:40 +0000 |
commit | 7a68ae27b0cc3517f232657f7bb371340cacd6bf (patch) | |
tree | ea603ad0a5b14a183d6d8b321f8b42d6068fa44c /app/controllers/documents_controller.rb | |
parent | 33e25255e3ec231c9db05daa6f481b59b96e6bc4 (diff) | |
download | redmine-7a68ae27b0cc3517f232657f7bb371340cacd6bf.tar.gz redmine-7a68ae27b0cc3517f232657f7bb371340cacd6bf.zip |
Reverted r8007.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8008 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/controllers/documents_controller.rb')
-rw-r--r-- | app/controllers/documents_controller.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/app/controllers/documents_controller.rb b/app/controllers/documents_controller.rb index 633ffd8ed..09b76781f 100644 --- a/app/controllers/documents_controller.rb +++ b/app/controllers/documents_controller.rb @@ -76,4 +76,11 @@ class DocumentsController < ApplicationController Mailer.deliver_attachments_added(attachments[:files]) if attachments.present? && attachments[:files].present? && Setting.notified_events.include?('document_added') redirect_to :action => 'show', :id => @document end + +private + def find_project + @project = Project.find(params[:project_id]) + rescue ActiveRecord::RecordNotFound + render_404 + end end |