I have an authentication system made by hand with all the models and methods for sign in, etc. How hard is it to replace all that system for Dev开发者_C百科ise? I see Devise creates the models and that but in this case I already have them.
What steps should I follow?
Thank you.
You can install Devise as is instructed in the documentation. When you run the generator, don't override the model and don't run the migration and you'll be fine.
You might want to try the complete installation out in a separate rails application and see what you need to change in your own application, like rename any columns to what Devise expects. You can remove your own controllers too.
Devise is really flexible. If you want to change the behavior of the controllers, you can inherit from the original ones and instruct the router to use your own. Devise has many hook methods you can override in your own subclasses.
精彩评论