Create a devise user from Ruby console

前端 未结 5 1380
广开言路
广开言路 2020-12-04 04:48

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

5条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-04 05:36

    None of the above answers worked for me.

    This is what I did:

    User.create(email: "a@a.com", password: "asdasd", password_confirmation: "asdasd")
    

    Keep in mind that the password must be bigger than 6 characters.

提交回复
热议问题