Skip to content

Instantly share code, notes, and snippets.

@beneggett
Created October 24, 2012 07:03
Show Gist options
  • Save beneggett/3944474 to your computer and use it in GitHub Desktop.
Save beneggett/3944474 to your computer and use it in GitHub Desktop.
## Create User
User.create! :first_name => "Test", :last_name => "User", :email => "test@dummy.com", :password => "password123"# add whatever other parameters you have here
# if you wanted to make user an admin (which I'm assuming you do if it's in a seed file) do:
u = User.create! :first_name => "Test", :last_name => "User", :email => "test@dummy.com", :password => "password123"
u.spree_roles << Spree::Role.find_or_create_by_name("admin")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment