From 1a28bd8e7e3adf7a8423005cc39ccf0b151f3bda Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Wed, 30 Nov 2011 19:08:06 +0000 Subject: [PATCH] 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 --- app/controllers/documents_controller.rb | 9 +-------- 1 file changed, 1 insertion(+), 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