How to replace authentication system for Devise in Rails?

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 Devise? 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.

Need Your Help

Migrating from Sitemesh to Apache Tiles

spring-mvc tiles spring-webflow tiles2 apache-tiles

I'm developing my own project using spring-mvc and spring-webflow. After reading some articles about spring webflow and ajax, I understood the better option is the use of Apache Tiles for rendering...

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.