Skip to content

Instantly share code, notes, and snippets.

@softwaregravy
Created August 7, 2011 03:28
Show Gist options
  • Save softwaregravy/1130027 to your computer and use it in GitHub Desktop.
Save softwaregravy/1130027 to your computer and use it in GitHub Desktop.
Registar the User Implicitly
def register_user
password = User.send(:generate_token, 'encrypted_password').slice(0, 6)
user = User.create!(:name => name, :email => email, :age => age,
:password => password, :password_confirmation => password)
Notifications.signup(user, password).deliver
self.user = user
self.save!
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment