[Rails] Re: validates_uniqueness_of - how did I get two users?

2009-03-01 Thread Sarah Mei
In ActiveRecord::Base, the save method takes a flag called perform_validation, which you can set to false. Check your controller code to make sure someone didn't decide to skip the validations somewhere. On Sat, Feb 28, 2009 at 4:39 PM, phil p...@philsmy.com wrote: The odd thing is that the

[Rails] Re: validates_uniqueness_of - how did I get two users?

2009-02-28 Thread Maurício Linhares
No, it doesn't mean that the combination is unique, it means that :login and :email are going to be unique. There are two possible reasons, the user was added manually at the database (which is bad, as the database should have a unique index at both columns) or you got into a racing condition,

[Rails] Re: validates_uniqueness_of - how did I get two users?

2009-02-28 Thread phil
The odd thing is that the users were created through the website two months apart! On Feb 28, 10:41 pm, Maurício Linhares mauricio.linha...@gmail.com wrote: No, it doesn't mean that the combination is unique, it means that :login and :email are going to be unique. There are two possible