]> source.dussan.org Git - redmine.git/commitdiff
Redirect to referer to preserve pagination and filter.
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Tue, 30 Aug 2016 20:20:09 +0000 (20:20 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Tue, 30 Aug 2016 20:20:09 +0000 (20:20 +0000)
git-svn-id: http://svn.redmine.org/redmine/trunk@15758 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/controllers/groups_controller.rb

index f133e7bb510b55192a9c1247eba7f3a0f2998e30..52a1242b8cb0e7555bd3356747a64df9177c6c7d 100644 (file)
@@ -84,7 +84,7 @@ class GroupsController < ApplicationController
     respond_to do |format|
       if @group.save
         flash[:notice] = l(:notice_successful_update)
-        format.html { redirect_to(groups_path) }
+        format.html { redirect_to_referer_or(groups_path) }
         format.api  { render_api_ok }
       else
         format.html { render :action => "edit" }
@@ -97,7 +97,7 @@ class GroupsController < ApplicationController
     @group.destroy
 
     respond_to do |format|
-      format.html { redirect_to(groups_path) }
+      format.html { redirect_to_referer_or(groups_path) }
       format.api  { render_api_ok }
     end
   end