Last active
August 29, 2015 14:13
-
-
Save mib32/38ffc3b871d51580fe8d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def after_sign_up_or_in_path_for resource | |
if resource.doctor? || resource.clinic? | |
spree.edit_account_path | |
else | |
yield | |
end | |
end | |
Spree::UserSessionsController.class_eval do | |
def after_sign_in_path_for(resource) | |
after_sign_up_or_in_path_for resource do | |
super | |
end | |
end | |
end | |
Spree::UserRegistrationsController.class_eval do | |
def after_sign_up_path_for(resource) | |
after_sign_up_or_in_path_for resource do | |
super | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment