diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2011-11-30 19:08:06 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2011-11-30 19:08:06 +0000 |
commit | 1a28bd8e7e3adf7a8423005cc39ccf0b151f3bda (patch) | |
tree | f4b3cca2d47500950b7fac5d6a6a95e90fe8c88a /app/controllers/documents_controller.rb | |
parent | 7a68ae27b0cc3517f232657f7bb371340cacd6bf (diff) | |
download | redmine-1a28bd8e7e3adf7a8423005cc39ccf0b151f3bda.tar.gz redmine-1a28bd8e7e3adf7a8423005cc39ccf0b151f3bda.zip |
Removed #find_project already defined as #find_project_by_project_id in parent class.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8009 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/controllers/documents_controller.rb')
-rw-r--r-- | app/controllers/documents_controller.rb | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/app/controllers/documents_controller.rb b/app/controllers/documents_controller.rb index 09b76781f..48b66df2d 100644 --- a/app/controllers/documents_controller.rb +++ b/app/controllers/documents_controller.rb @@ -18,7 +18,7 @@ class DocumentsController < ApplicationController default_search_scope :documents model_object Document - before_filter :find_project, :only => [:index, :new] + before_filter :find_project_by_project_id, :only => [:index, :new] before_filter :find_model_object, :except => [:index, :new] before_filter :find_project_from_association, :except => [:index, :new] before_filter :authorize @@ -76,11 +76,4 @@ 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 |