Any idea on how to create and save a new User object with devise from the ruby console?
When I tried to save it, I\'m getting always false. I guess I\'m missing some
When on your model has :confirmable option this mean the object user should be confirm first. You can do two ways to save user.
a. first is skip confirmation:
newuser = User.new({email: 'superadmin1@testing.com', password: 'password', password_confirmation: 'password'})
newuser.skip_confirmation!
newuser.save
b. or use confirm! :
newuser = User.new({email: 'superadmin2@testing.com', password: 'password', password_confirmation: 'password'})
newuser.confirm!
newuser.save