From: Jean-Philippe Lang Date: Thu, 1 Dec 2011 21:16:44 +0000 (+0000) Subject: Controller cleanup. X-Git-Tag: 1.4.0~1236 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=6475fe647414c47f0af7f3caa2fbfdd206b50c67;p=redmine.git Controller cleanup. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8021 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/app/controllers/boards_controller.rb b/app/controllers/boards_controller.rb index f9a507e6b..b5bce0c6a 100644 --- a/app/controllers/boards_controller.rb +++ b/app/controllers/boards_controller.rb @@ -17,15 +17,12 @@ class BoardsController < ApplicationController default_search_scope :messages - before_filter :find_project, :find_board_if_available, :authorize + before_filter :find_project_by_project_id, :find_board_if_available, :authorize accept_rss_auth :index, :show - helper :messages - include MessagesHelper helper :sort include SortHelper helper :watchers - include WatchersHelper def index @boards = @project.boards @@ -100,12 +97,6 @@ private redirect_to :controller => 'projects', :action => 'settings', :id => @project, :tab => 'boards' end - def find_project - @project = Project.find(params[:project_id]) - rescue ActiveRecord::RecordNotFound - render_404 - end - def find_board_if_available @board = @project.boards.find(params[:id]) if params[:id] rescue ActiveRecord::RecordNotFound