In my development and test environments, I want to seed the database with a bunch of users. I\'m using Ruby on Rails v3.2.8 and the latest Devise. So I added this line in
Don't try create the encrypted password, devise handles that for you. This will work, just make sure the password is a minimum 6 characters long.
User.create(
email: "test@test.com",
password: "123456"
)
Even better, in your terminal:
$bundle add faker
Then:
User.create(
email: test@test.com,
password: "123456"
)
10.times do
User.create(
email: Faker::Internet.email,
password: "123456"
)
end
Just make sure you set at least one email in your seeds that you can remember. Hence retaining the 'test' email.