diff options
author | Eric Davis <edavis@littlestreamsoftware.com> | 2010-03-04 05:33:35 +0000 |
---|---|---|
committer | Eric Davis <edavis@littlestreamsoftware.com> | 2010-03-04 05:33:35 +0000 |
commit | ca6df3d78d605c008d17f7eb6e9e9efa464ea721 (patch) | |
tree | 71f326ad2b62b94b1e9ca8fece12154ab6aa4af0 /app/controllers/boards_controller.rb | |
parent | 976cba0c5d188ed8aa3dd756d634a3ee3a562177 (diff) | |
download | redmine-ca6df3d78d605c008d17f7eb6e9e9efa464ea721.tar.gz redmine-ca6df3d78d605c008d17f7eb6e9e9efa464ea721.zip |
Refactor: Extract method
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3534 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/controllers/boards_controller.rb')
-rw-r--r-- | app/controllers/boards_controller.rb | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/app/controllers/boards_controller.rb b/app/controllers/boards_controller.rb index 436398d1c..843d0e27c 100644 --- a/app/controllers/boards_controller.rb +++ b/app/controllers/boards_controller.rb @@ -68,22 +68,26 @@ class BoardsController < ApplicationController @board.project = @project if request.post? && @board.save flash[:notice] = l(:notice_successful_create) - redirect_to :controller => 'projects', :action => 'settings', :id => @project, :tab => 'boards' + redirect_to_settings_in_projects end end def edit if request.post? && @board.update_attributes(params[:board]) - redirect_to :controller => 'projects', :action => 'settings', :id => @project, :tab => 'boards' + redirect_to_settings_in_projects end end def destroy @board.destroy - redirect_to :controller => 'projects', :action => 'settings', :id => @project, :tab => 'boards' + redirect_to_settings_in_projects end private + def redirect_to_settings_in_projects + redirect_to :controller => 'projects', :action => 'settings', :id => @project, :tab => 'boards' + end + def find_project @project = Project.find(params[:project_id]) @board = @project.boards.find(params[:id]) if params[:id] |