paulo
unread,Oct 4, 2010, 10:23:52 AM10/4/10Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Devise
Hi all,
I'm implementing a system which requires logins through usernames,
rather than e-mail addresses. I have updated
config.authentication_keys to use the username field, which has been
added successfully to my model, and logins work.
User accounts still need an email field, but accounts may share the
same e-mail address, which is causing problems, as rails/devise is
expecting a unique email address when adding new users.
There is nothing in my model which is enforcing the uniqueness of the
email field, and I've updated my db to remove and indexes which may
have been adding the constraint, but this hasn't made a difference so
far.
When adding a duplicate through the rails console, the command fails
with the error:
'#<OrderedHash {:email=>["has already been taken"]}'
Has anyone else had this problem or have any ideas where the
constraint is being enforced? (I am presuming somewhere in devise?)?
Much appreciated,
Paul Taylor