I'm trying to customize Devise on Rails using mongoid. I have setup devise and sign up and sign in pages are already showing. However, the fields are just email, password and password confirmation. I want to add fields such as username and others. I've read instructions but they're all using active record. Does anyone know a simple way of doing this in Mongodb? Do I need to generate devise views just to add the username field on my sign up form? Any help or suggestions would be appreciated. Thanks 开发者_如何学Pythona lot in advance!
Yes, you are right, generate devise views with rails generate devise:views
and customize it for your own needs.
and add the keys you require to your model and make it accessible;
field :name
attr_accessible :name
精彩评论