Keep GET params in return URL
When signing in from a page containing GET params, like `/budgets/1/investments?heading_id=4`, we were redirected to a URL without those GET params; in this case, `/budgets/1/investments`. Using the request fullpath, as recommended in the devise documentation, keeps these parameters when redirecting.
This commit is contained in:
@@ -108,7 +108,7 @@ class ApplicationController < ActionController::Base
|
||||
|
||||
def set_return_url
|
||||
if !devise_controller? && controller_name != "welcome" && is_navigational_format?
|
||||
store_location_for(:user, request.path)
|
||||
store_location_for(:user, request.fullpath)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user