I use a program with a security extension to check for strong passwords.
When I try to register an account with an email already received, I get the error message "email has already been received" twice in the error hash.
My user model is as follows:
class User < ActiveRecord::Base
devise :database_authenticatable, :registerable, :secure_validatable
attr_accessible :email, :firstname, :lastname, :password, :password_confirmation, :remember_me
end
Without a security extension ( :validatableinstead :secure_validatable), I get an error only once.
What am I doing wrong?
PS Bonus question:
How to prevent the appearance of certain errors in the first place? Should I manipulate the RegistrationsController device or is there an option for this?
source
share