@@ -17,7 +17,7 | |||
|
17 | 17 | |
|
18 | 18 | class BoardsController < ApplicationController |
|
19 | 19 | default_search_scope :messages |
|
20 | before_filter :find_project, :authorize | |
|
20 | before_filter :find_project, :find_board_if_available, :authorize | |
|
21 | 21 | |
|
22 | 22 | helper :messages |
|
23 | 23 | include MessagesHelper |
@@ -90,6 +90,11 private | |||
|
90 | 90 | |
|
91 | 91 | def find_project |
|
92 | 92 | @project = Project.find(params[:project_id]) |
|
93 | rescue ActiveRecord::RecordNotFound | |
|
94 | render_404 | |
|
95 | end | |
|
96 | ||
|
97 | def find_board_if_available | |
|
93 | 98 | @board = @project.boards.find(params[:id]) if params[:id] |
|
94 | 99 | rescue ActiveRecord::RecordNotFound |
|
95 | 100 | render_404 |
General Comments 0
You need to be logged in to leave comments.
Login now