Created
November 7, 2013 13:28
-
-
Save svisamsetty/7354562 to your computer and use it in GitHub Desktop.
how to create a user and add role.
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
#to create user | |
@user = User.new | |
@user.email = 'xyz@gmail.com' | |
@user.password = 'test123' | |
@user.save | |
#to set admin role | |
@user.add_role :admin |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment