I use authlogic with my user model, with an input field set to use email, like this:
acts_as_authentic do |c| c.login_field = :email end
If I try to create a new user and the email is already in use, it adds a duplicate email error twice: (from the console)
user = User.new(:first_name => "fred", :last_name => "Smith", :email => User.last.email);user.valid?;errors = user.errors => {:email=>["has already been taken", "has already been taken"]}
I suppose this has something to do with using email as a login, maybe? I have no other email checks other than validates_format_of, and I experimented with deleting this check (it doesn't make any difference).
This is a pain because it ruined my mistakes, which I show on the form when the validation fails.
Before I try to hack authlogic, does anyone know why this could happen? thanks max
Max williams
source share