Step on how to add devise migration to existing User model in ruby on rails?

后端 未结 2 1326
栀梦
栀梦 2020-12-15 12:20

I have a User model created already. I am wondering how should I configure devise with my existing User model. That being said, do I need to setup any additional routes or m

2条回答
  •  执念已碎
    2020-12-15 12:52

    Just add devise_for :user in your routes

    Add attr_accessible :password, :password_confirmation

    and for more info take a look at a typical devise model

    https://github.com/johndel/Rails-Simple-CMS/blob/master/app/models/admin.rb

    (Pretty simple)

提交回复
热议问题