I'm using restful_authentication to let users register and login.
Lately, however, I'm seeing multiple login and emails being created
even though I have validates_uniqueness_of as below:
I'm using restful_authentication to let users register and login.
Lately, however, I'm seeing multiple login and emails being created
even though I have validates_uniqueness_of as below:
Have you checked they don't differ only by a space or something? Other
than that validates_uniqueness_of is vulnerable to race conditions. If
you want a 100% reliable enforcement of this, use a unique index.