summaryrefslogtreecommitdiffstats
path: root/app/controllers/custom_fields_controller.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2012-12-11 17:51:30 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2012-12-11 17:51:30 +0000
commit0b9609468094fdb99ea9e0b68677dd178f85538c (patch)
tree736718d4e4684810e593863cfa051ac1a6a68251 /app/controllers/custom_fields_controller.rb
parentcf66561b1ef5f80360588bc4e4691bf464cd88fc (diff)
downloadredmine-0b9609468094fdb99ea9e0b68677dd178f85538c.tar.gz
redmine-0b9609468094fdb99ea9e0b68677dd178f85538c.zip
Use named routes in controllers.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10981 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/controllers/custom_fields_controller.rb')
-rw-r--r--app/controllers/custom_fields_controller.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/app/controllers/custom_fields_controller.rb b/app/controllers/custom_fields_controller.rb
index fb03277a7..59de860cd 100644
--- a/app/controllers/custom_fields_controller.rb
+++ b/app/controllers/custom_fields_controller.rb
@@ -34,7 +34,7 @@ class CustomFieldsController < ApplicationController
if request.post? and @custom_field.save
flash[:notice] = l(:notice_successful_create)
call_hook(:controller_custom_fields_new_after_save, :params => params, :custom_field => @custom_field)
- redirect_to :action => 'index', :tab => @custom_field.class.name
+ redirect_to custom_fields_path(:tab => @custom_field.class.name)
else
render :action => 'new'
end
@@ -47,7 +47,7 @@ class CustomFieldsController < ApplicationController
if request.put? and @custom_field.update_attributes(params[:custom_field])
flash[:notice] = l(:notice_successful_update)
call_hook(:controller_custom_fields_edit_after_save, :params => params, :custom_field => @custom_field)
- redirect_to :action => 'index', :tab => @custom_field.class.name
+ redirect_to custom_fields_path(:tab => @custom_field.class.name)
else
render :action => 'edit'
end
@@ -55,10 +55,10 @@ class CustomFieldsController < ApplicationController
def destroy
@custom_field.destroy
- redirect_to :action => 'index', :tab => @custom_field.class.name
+ redirect_to custom_fields_path(:tab => @custom_field.class.name)
rescue
flash[:error] = l(:error_can_not_delete_custom_field)
- redirect_to :action => 'index'
+ redirect_to custom_fields_path(:tab => @custom_field.class.name)
end
private