From b1e105abe2a2bcad90b1e61ae64fd8bb4dbec588 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Wed, 7 Jan 2015 22:52:23 +0000 Subject: [PATCH] Redirect to the current page when reordering roles (#18769). MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Patch by Jérôme BATAILLE. git-svn-id: http://svn.redmine.org/redmine/trunk@13852 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/controllers/roles_controller.rb | 2 +- app/views/roles/index.html.erb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/roles_controller.rb b/app/controllers/roles_controller.rb index a74d8bb91..79dec9d51 100644 --- a/app/controllers/roles_controller.rb +++ b/app/controllers/roles_controller.rb @@ -71,7 +71,7 @@ class RolesController < ApplicationController def update if @role.update_attributes(params[:role]) flash[:notice] = l(:notice_successful_update) - redirect_to roles_path + redirect_to roles_path(:page => params[:page]) else render :action => 'edit' end diff --git a/app/views/roles/index.html.erb b/app/views/roles/index.html.erb index 9eaab23b6..19a6c42c4 100644 --- a/app/views/roles/index.html.erb +++ b/app/views/roles/index.html.erb @@ -17,7 +17,7 @@ <%= content_tag(role.builtin? ? 'em' : 'span', link_to(h(role.name), edit_role_path(role))) %> <% unless role.builtin? %> - <%= reorder_links('role', {:action => 'update', :id => role}, :put) %> + <%= reorder_links('role', {:action => 'update', :id => role, :page => params[:page]}, :put) %> <% end %> -- 2.39.5