@@ -17,15 +17,12 | |||
|
17 | 17 | |
|
18 | 18 | class BoardsController < ApplicationController |
|
19 | 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 | 21 | accept_rss_auth :index, :show |
|
22 | 22 | |
|
23 | helper :messages | |
|
24 | include MessagesHelper | |
|
25 | 23 | helper :sort |
|
26 | 24 | include SortHelper |
|
27 | 25 | helper :watchers |
|
28 | include WatchersHelper | |
|
29 | 26 | |
|
30 | 27 | def index |
|
31 | 28 | @boards = @project.boards |
@@ -100,12 +97,6 private | |||
|
100 | 97 | redirect_to :controller => 'projects', :action => 'settings', :id => @project, :tab => 'boards' |
|
101 | 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 | 100 | def find_board_if_available |
|
110 | 101 | @board = @project.boards.find(params[:id]) if params[:id] |
|
111 | 102 | rescue ActiveRecord::RecordNotFound |
General Comments 0
You need to be logged in to leave comments.
Login now