diff options
author | Ian Stewart <istewart@me.com> | 2011-06-28 22:18:24 -0700 |
---|---|---|
committer | Ian Stewart <istewart@me.com> | 2011-06-28 22:18:24 -0700 |
commit | eafa174bfdeef943669332b67d87078b9b88e02d (patch) | |
tree | 1261787801779d58c2a41fa6b090fc5379f82709 /activemodel/lib | |
parent | 31536855ae90bf2fb07c855d05837246b5aa6fb9 (diff) | |
download | rails-eafa174bfdeef943669332b67d87078b9b88e02d.tar.gz rails-eafa174bfdeef943669332b67d87078b9b88e02d.tar.bz2 rails-eafa174bfdeef943669332b67d87078b9b88e02d.zip |
changing an attribute multiple times retains the correct original value
Diffstat (limited to 'activemodel/lib')
-rw-r--r-- | activemodel/lib/active_model/dirty.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activemodel/lib/active_model/dirty.rb b/activemodel/lib/active_model/dirty.rb index 3b412d3dd7..166cccf161 100644 --- a/activemodel/lib/active_model/dirty.rb +++ b/activemodel/lib/active_model/dirty.rb @@ -156,7 +156,7 @@ module ActiveModel rescue TypeError, NoMethodError end - changed_attributes[attr] = value + changed_attributes[attr] = value unless changed_attributes.include?(attr) end # Handle <tt>reset_*!</tt> for +method_missing+. |