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
This commit is contained in:
parent
7a68ae27b0
commit
1a28bd8e7e
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue