crabideau5691/aware — pull request #3 by cviebrock (2012-03-15 03:32:07+00:00)
Title: Changes to validation logic on updates

I was running into trouble when updating a model. What happened was that, even though I was only changing one field, the validator was failing on other fields, specifically one that had a "unique" rule.

So my first code change was to only validate the dirty attributes instead of the full attribute set. This should only look at stuff that's changed.

The second code change was to then make sure the validator was only being passed the rules for those dirty attributes (to avoid "required" rules triggering for fields that weren't being updated).

Does this make sense?