Skip to content

Commit 6bfc556

Browse files
cpfergus1elia
andcommitted
Use spree_user instead of spree_current_user
Devise utilizes spree_user scope when executing after_sign_in_path. This is an important distinction when storing the user location as the user would not be redirected as expected if we use spree_current_user. Co-Authored-By: Elia Schito <[email protected]>
1 parent fd6f65f commit 6bfc556

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/spree/authentication_helpers.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,11 @@ def storable_spree_user_location?
4242
end
4343

4444
def store_spree_user_location!
45-
store_location_for(:spree_current_user, request.fullpath)
45+
store_location_for(:spree_user, request.fullpath)
4646
end
4747

4848
def stored_spree_user_location_or(fallback_location)
49-
stored_location_for(:spree_current_user) || fallback_location
49+
stored_location_for(:spree_user) || fallback_location
5050
end
5151
end
5252
end

0 commit comments

Comments
 (0)