views:

227

answers:

2

I generated the default devise (http://github.com/plataformatec/devise) views with:

rails generate devise:views

Then I added a username field to the views/devise/registrations/new.html.erb form.

Currently, only email and password validation occurs. How do I validate presence and uniqueness of the username field? Do I need to add something to the User model?

thx

A: 

Just add a username field to your User model and on the Devise wiki: http://github.com/plataformatec/devise/wiki/Sign-in-using-login-or-mail

Hope it helps.

julienXX
A: 

How to customize Device... Everything is here: http://railscasts.com/episodes/210-customizing-devise

-Olivier G.

Olivier Grimard