Created
January 17, 2015 14:35
-
-
Save mib32/b72c7eeac957d476c554 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 resource | |
if resource.doctor? || resource.clinic? | |
spree.edit_account_path | |
else | |
super | |
end | |
end | |
Spree::UserSessionsController.class_eval do | |
def after_sign_in_path_for(resource) | |
after_sign_up_or_in_path resource | |
end | |
end | |
Spree::UserRegistrationsController.class_eval do | |
def after_sign_up_path_for(resource) | |
after_sign_up_or_in_path resource | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment