Skip to content
This repository was archived by the owner on Jan 30, 2024. It is now read-only.

Commit bbfed46

Browse files
committed
Use devise method to store request location
1 parent 6fbf95f commit bbfed46

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

  • lib/devise_security_extension/controllers

lib/devise_security_extension/controllers/helpers.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def handle_password_change
3434
if signed_in?(scope) and warden.session(scope)['password_expired']
3535
# re-check to avoid infinite loop if date changed after login attempt
3636
if send(:"current_#{scope}").try(:need_change_password?)
37-
session["#{scope}_return_to"] = request.original_fullpath if request.get?
37+
store_location_for(scope, request.original_fullpath) if request.get?
3838
redirect_for_password_change scope
3939
return
4040
else
@@ -52,7 +52,7 @@ def handle_paranoid_verification
5252
if !devise_controller? && !request.format.nil? && request.format.html?
5353
Devise.mappings.keys.flatten.any? do |scope|
5454
if signed_in?(scope) && warden.session(scope)['paranoid_verify']
55-
session["#{scope}_return_to"] = request.original_fullpath if request.get?
55+
store_location_for(scope, request.original_fullpath) if request.get?
5656
redirect_for_paranoid_verification scope
5757
return
5858
end

0 commit comments

Comments
 (0)