I have Rails 3.2.11 application that i need to hook up with login. The Devise Database Authenticatable would have been ok except:
- I can’t create table/fields and need to use existing fields(Devise wants to create user model).
- Instead of user model, i have to use “existing model (student) with email and password fields.
Would any of you Rails guru tell me how to customize Devise or if to use something different.
Basic requirement is: use login system where someone has to register but use existing table/fields.
Thank you
You can customize devise as much as you want. Railscasts #210 gives information about customization options. You can create a devise model with any name you want btw. For example, you can do:
If you want a Student model. Pretty much everything in Devise can be customized, altough some changes are easier then others. You could also get all the controllers from devise at github and customize or just override them in your own application. The devise wiki has a lot of information about customizing:
https://github.com/plataformatec/devise/wiki
I can also recommend the revised railscast #250 authentication from scratch (also railscasts available for authorization from scratch), if you want full control on all your authentication options.