Wes Gamble wrote:
I have what I think is a simply question.
If I call update_attributes(params[:whatever]) to update my attributes for object :whatever, does the attribute updating stop as soon as any validation rule fails?
Assume 5 attributes, a-e. If a validates_xxx for "c" fails, does update_attributes return right away?
The reason I'm asking is that I have some attributes that I want to update even if validation for other attributes fails.
Do I need to take complete control of my attribute updating in this case?
I see that "update_attribute" (not plural) seems to address this.
Do I need to update my attributes one-by-one using update_attribute on params.each?
No, update_attributes will update all non-protected attributes in its argument hash before validation is performed. Is this not what you're seeing?