Skip to content

Instantly share code, notes, and snippets.

@murdoch
Created October 28, 2013 20:34
Show Gist options
  • Save murdoch/7204126 to your computer and use it in GitHub Desktop.
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
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