|
|
|
@ -29,7 +29,9 @@ |
|
|
|
|
|
|
|
|
|
class BoardsController < ApplicationController |
|
|
|
|
default_search_scope :messages |
|
|
|
|
before_filter :find_project, :find_board_if_available, :authorize |
|
|
|
|
before_filter :find_project_by_project_id, |
|
|
|
|
:authorize, |
|
|
|
|
:find_board_if_available |
|
|
|
|
accept_key_auth :index, :show |
|
|
|
|
|
|
|
|
|
include MessagesHelper |
|
|
|
@ -107,12 +109,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 |
|
|
|
|