Controller cleanup.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8021 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2011-12-01 21:16:44 +00:00
parent 2967023a0e
commit 6475fe6474
1 changed files with 1 additions and 10 deletions

View File

@ -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