rails/rails — pull request #6675 by acapilleri (2012-06-08 08:22:12+00:00)
Title: Validates_numericality_of is skipped when changing 0 to to non-empty str...

...ing, fixes #6393

This happens when A has_many many B and A accepts_nested_attributes B that has a numeric colum
with initial 0 value. So a.update_attributes({:b_attributes => { :id => b.id, :numeric => 'foo' }})
passes the validation test but, the value of :numeric doesn't change.
his commit forces that the update fails with the above conditions.