diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-12-11 19:39:47 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-12-11 19:39:47 +0000 |
commit | 8ab9215ea8df2216ccfacf272804811b05ab82c8 (patch) | |
tree | ac9ab871a1f9fc1a190cd6505ee08e8efacf8863 /app/controllers/issue_statuses_controller.rb | |
parent | 60d06d8c17290f536cf76ffd4a75bdafe540aa9a (diff) | |
download | redmine-8ab9215ea8df2216ccfacf272804811b05ab82c8.tar.gz redmine-8ab9215ea8df2216ccfacf272804811b05ab82c8.zip |
Use named routes in controllers.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10983 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/controllers/issue_statuses_controller.rb')
-rw-r--r-- | app/controllers/issue_statuses_controller.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/app/controllers/issue_statuses_controller.rb b/app/controllers/issue_statuses_controller.rb index 13943ddf8..ddaf9304d 100644 --- a/app/controllers/issue_statuses_controller.rb +++ b/app/controllers/issue_statuses_controller.rb @@ -42,7 +42,7 @@ class IssueStatusesController < ApplicationController @issue_status = IssueStatus.new(params[:issue_status]) if request.post? && @issue_status.save flash[:notice] = l(:notice_successful_create) - redirect_to :action => 'index' + redirect_to issue_statuses_path else render :action => 'new' end @@ -56,7 +56,7 @@ class IssueStatusesController < ApplicationController @issue_status = IssueStatus.find(params[:id]) if request.put? && @issue_status.update_attributes(params[:issue_status]) flash[:notice] = l(:notice_successful_update) - redirect_to :action => 'index' + redirect_to issue_statuses_path else render :action => 'edit' end @@ -64,10 +64,10 @@ class IssueStatusesController < ApplicationController def destroy IssueStatus.find(params[:id]).destroy - redirect_to :action => 'index' + redirect_to issue_statuses_path rescue flash[:error] = l(:error_unable_delete_issue_status) - redirect_to :action => 'index' + redirect_to issue_statuses_path end def update_issue_done_ratio @@ -76,6 +76,6 @@ class IssueStatusesController < ApplicationController else flash[:error] = l(:error_issue_done_ratios_not_updated) end - redirect_to :action => 'index' + redirect_to issue_statuses_path end end |