diff options
author | William Myers <griffin.myers@gmail.com> | 2013-01-07 00:04:35 -0500 |
---|---|---|
committer | William Myers <griffin.myers@gmail.com> | 2013-05-27 23:41:26 -0400 |
commit | 0e655873d4f41922fa2614919342482b1dbd2343 (patch) | |
tree | 40556ae1d63ee53e093db4d8c2606d79b6ecff24 /activemodel/lib/active_model/validations.rb | |
parent | 19b52d3f81080d8eacb78c94bd5957ef7c637d07 (diff) | |
download | rails-0e655873d4f41922fa2614919342482b1dbd2343.tar.gz rails-0e655873d4f41922fa2614919342482b1dbd2343.tar.bz2 rails-0e655873d4f41922fa2614919342482b1dbd2343.zip |
DirtyModel uses a hash to keep track of any changes made to attributes
of an instance. When using the attribute_will_change! method, you must
supply a string and not a symbol or the *_changed? method will break
(because it is looking for the attribute name as a string in the keys
of the underlying hash). To remedy this, I simply made the underlying
hash a HashWithIndifferentAccess so it won't matter if you supply
the attribute name as a symbol or string to attribute_will_change!.
Diffstat (limited to 'activemodel/lib/active_model/validations.rb')
0 files changed, 0 insertions, 0 deletions