Re: [Rails-core] Adding dirty checking by default to uniqueness validations

2014-11-07 Thread Al Tenhundfeld
Hey Ryan, No idea if this would be accepted, but I have two questions: 1) Do any other validators have this behavior? I don't think so, but I'm not sure. Consistency isn't always the highest priority, but it's an important consideration. I guess you could argue that this validator is special

Re: [Rails-core] Adding dirty checking by default to uniqueness validations

2014-11-07 Thread Matt Jones
On Nov 6, 2014, at 1:40 PM, Ryan Moser ryanpmo...@gmail.com wrote: I find it a bit odd that validates_uniqueness_of always hits the database even when the attribute we are concerned with has not changed. It's easy enough to add a dirty checking condition to a uniqueness validation, but it

[Rails-core] Adding dirty checking by default to uniqueness validations

2014-11-06 Thread Ryan Moser
I find it a bit odd that validates_uniqueness_of always hits the database even when the attribute we are concerned with has not changed. It's easy enough to add a dirty checking condition to a uniqueness validation, but it seems like this should be the default behavior and always running the