|
What we're listening to:
|
Active Record Race ConditionsAugust 7th, 2008Today, I got bit by ActiveRecord race condition related to validates_uniqueness_of. Sometimes I just blindly trust that Rails is going to take care of things, and so it surprised me when I ended up with duplicate records in my database. A few people have written about this, and apparently it’s in the API Docs now, but I just hadn’t thought about it before. The solution looks to be enforcing unique constraints at the database level. |