summaryrefslogtreecommitdiffstats
path: root/app/controllers/news_controller.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2012-03-10 13:44:52 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2012-03-10 13:44:52 +0000
commit125f5e1710db0e97a57a3ad3e2b9a3401489ee00 (patch)
treeb5effb4880627bac55e60f772ad75af6efa9b695 /app/controllers/news_controller.rb
parentaebaaad85ae7dae387f89a98810a3f032394c52a (diff)
downloadredmine-125f5e1710db0e97a57a3ad3e2b9a3401489ee00.tar.gz
redmine-125f5e1710db0e97a57a3ad3e2b9a3401489ee00.zip
Use #find_project_by_project_id from super-class.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9172 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/controllers/news_controller.rb')
-rw-r--r--app/controllers/news_controller.rb9
1 files changed, 2 insertions, 7 deletions
diff --git a/app/controllers/news_controller.rb b/app/controllers/news_controller.rb
index 553f80e2f..19c654f89 100644
--- a/app/controllers/news_controller.rb
+++ b/app/controllers/news_controller.rb
@@ -20,7 +20,7 @@ class NewsController < ApplicationController
model_object News
before_filter :find_model_object, :except => [:new, :create, :index]
before_filter :find_project_from_association, :except => [:new, :create, :index]
- before_filter :find_project, :only => [:new, :create]
+ before_filter :find_project_by_project_id, :only => [:new, :create]
before_filter :authorize, :except => [:index]
before_filter :find_optional_project, :only => :index
accept_rss_auth :index
@@ -99,12 +99,7 @@ class NewsController < ApplicationController
redirect_to :action => 'index', :project_id => @project
end
-private
- def find_project
- @project = Project.find(params[:project_id])
- rescue ActiveRecord::RecordNotFound
- render_404
- end
+ private
def find_optional_project
return true unless params[:project_id]