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
If you're using the devise confirmable module you need to do something like:
user = User.new(
email: 'user@domain.com',
password: '123456789',
password_confirmation: '123456789'
)
user.skip_confirmation!
user.save!
The skip_confirmation! call just tell to devise that you don't need to confirm this account.
Other option is just set the confirmed_at user attribute as Time.now.utc before save.