Skip to content

Instantly share code, notes, and snippets.

@yeban
Created June 14, 2009 11:44
Show Gist options
  • Save yeban/129647 to your computer and use it in GitHub Desktop.
Save yeban/129647 to your computer and use it in GitHub Desktop.
def on_success!(response, ax_response)
debugger
email=ax_response.data["http://schema.openid.net/contact/email"]
if user = find_user_by_email(email)
user
else
user=user_class.new({:email=>email})
user.save
user
end
end
def find_user_by_email(email)
user_class.first(:email => email)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment