@@ -17,15 +17,12 | |||||
17 |
|
17 | |||
18 | class BoardsController < ApplicationController |
|
18 | class BoardsController < ApplicationController | |
19 | default_search_scope :messages |
|
19 | default_search_scope :messages | |
20 | before_filter :find_project, :find_board_if_available, :authorize |
|
20 | before_filter :find_project_by_project_id, :find_board_if_available, :authorize | |
21 | accept_rss_auth :index, :show |
|
21 | accept_rss_auth :index, :show | |
22 |
|
22 | |||
23 | helper :messages |
|
|||
24 | include MessagesHelper |
|
|||
25 | helper :sort |
|
23 | helper :sort | |
26 | include SortHelper |
|
24 | include SortHelper | |
27 | helper :watchers |
|
25 | helper :watchers | |
28 | include WatchersHelper |
|
|||
29 |
|
26 | |||
30 | def index |
|
27 | def index | |
31 | @boards = @project.boards |
|
28 | @boards = @project.boards | |
@@ -100,12 +97,6 private | |||||
100 | redirect_to :controller => 'projects', :action => 'settings', :id => @project, :tab => 'boards' |
|
97 | redirect_to :controller => 'projects', :action => 'settings', :id => @project, :tab => 'boards' | |
101 | end |
|
98 | end | |
102 |
|
99 | |||
103 | def find_project |
|
|||
104 | @project = Project.find(params[:project_id]) |
|
|||
105 | rescue ActiveRecord::RecordNotFound |
|
|||
106 | render_404 |
|
|||
107 | end |
|
|||
108 |
|
||||
109 | def find_board_if_available |
|
100 | def find_board_if_available | |
110 | @board = @project.boards.find(params[:id]) if params[:id] |
|
101 | @board = @project.boards.find(params[:id]) if params[:id] | |
111 | rescue ActiveRecord::RecordNotFound |
|
102 | rescue ActiveRecord::RecordNotFound |
General Comments 0
You need to be logged in to leave comments.
Login now