Created
October 28, 2013 20:34
-
-
Save murdoch/7204126 to your computer and use it in GitHub Desktop.
Devise: Do something if it's the first login, there are much better ways to do this, but here's a quick one
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_in_path_for(resource_or_scope) | |
if first_login | |
getting_started_path | |
else | |
super | |
end | |
end | |
def first_login | |
current_user.sign_in_count == 0 | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment