Skip to content

Instantly share code, notes, and snippets.

@mib32
Created January 17, 2015 14:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mib32/b72c7eeac957d476c554 to your computer and use it in GitHub Desktop.
Save mib32/b72c7eeac957d476c554 to your computer and use it in GitHub Desktop.
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