Skip to content

Instantly share code, notes, and snippets.

@urfolomeus
Created May 7, 2013 14:26
Show Gist options
  • Save urfolomeus/5532950 to your computer and use it in GitHub Desktop.
Save urfolomeus/5532950 to your computer and use it in GitHub Desktop.
def create
user = User.find_by_omniauth(request.env["omniauth.auth"])
if user
path = root_url
else
user = User.create_with_omniauth(request.env["omniauth.auth"])
path = edit_user_path(user)
session[:new_user] = true
end
session[:user_id] = user.id
redirect_to path
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment