mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-09 03:20:21 +00:00
Don't override devise's after_sign_in_path_for, use specific before filters for user sessions and registrations controllers instead
This commit is contained in:
@@ -8,15 +8,12 @@ class ApplicationController < ActionController::Base
|
||||
super(options, response_status)
|
||||
end
|
||||
|
||||
def after_sign_in_path_for(resource)
|
||||
def set_checkout_redirect
|
||||
if request.referer and referer_path = URI(request.referer).path
|
||||
[main_app.checkout_path].include?(referer_path) ? referer_path : root_path
|
||||
else
|
||||
root_path
|
||||
session["spree_user_return_to"] = [main_app.checkout_path].include?(referer_path) ? referer_path : root_path
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
private
|
||||
|
||||
def require_distributor_chosen
|
||||
|
||||
Reference in New Issue
Block a user