summaryrefslogtreecommitdiffstats
path: root/app/controllers/custom_fields_controller.rb
diff options
context:
space:
mode:
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