Created
August 7, 2011 03:28
-
-
Save softwaregravy/1130027 to your computer and use it in GitHub Desktop.
Registar the User Implicitly
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 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