diff options
author | Eric Davis <edavis@littlestreamsoftware.com> | 2010-03-04 05:33:40 +0000 |
---|---|---|
committer | Eric Davis <edavis@littlestreamsoftware.com> | 2010-03-04 05:33:40 +0000 |
commit | 3a99f189139f1b950dae5303c7cee7fbc52ad178 (patch) | |
tree | 857484ea105aeb962f3409b8dbe2f46052d17ec5 /app/controllers/boards_controller.rb | |
parent | ca6df3d78d605c008d17f7eb6e9e9efa464ea721 (diff) | |
download | redmine-3a99f189139f1b950dae5303c7cee7fbc52ad178.tar.gz redmine-3a99f189139f1b950dae5303c7cee7fbc52ad178.zip |
Refactor: Split method
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3535 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/controllers/boards_controller.rb')
-rw-r--r-- | app/controllers/boards_controller.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/app/controllers/boards_controller.rb b/app/controllers/boards_controller.rb index 843d0e27c..541fefada 100644 --- a/app/controllers/boards_controller.rb +++ b/app/controllers/boards_controller.rb @@ -17,7 +17,7 @@ class BoardsController < ApplicationController default_search_scope :messages - before_filter :find_project, :authorize + before_filter :find_project, :find_board_if_available, :authorize helper :messages include MessagesHelper @@ -90,6 +90,11 @@ private 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 render_404 |