diff options
author | Jon Leighton <j@jonathanleighton.com> | 2011-12-22 23:21:38 +0000 |
---|---|---|
committer | Jon Leighton <j@jonathanleighton.com> | 2011-12-22 23:21:38 +0000 |
commit | 967490badfb7163d653a75bf0637f66e78883f9e (patch) | |
tree | 27515e19310ff4ec56c1740ee4920473f93088dd /activerecord/lib | |
parent | 13a9efe62ed202919e208bbee8565ffd68e39ca3 (diff) | |
download | rails-967490badfb7163d653a75bf0637f66e78883f9e.tar.gz rails-967490badfb7163d653a75bf0637f66e78883f9e.tar.bz2 rails-967490badfb7163d653a75bf0637f66e78883f9e.zip |
Fix build when IM=true
Diffstat (limited to 'activerecord/lib')
-rw-r--r-- | activerecord/lib/active_record/identity_map.rb | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/activerecord/lib/active_record/identity_map.rb b/activerecord/lib/active_record/identity_map.rb index b15b5a8133..680d9ffea0 100644 --- a/activerecord/lib/active_record/identity_map.rb +++ b/activerecord/lib/active_record/identity_map.rb @@ -111,13 +111,12 @@ module ActiveRecord # model object. def reinit_with(coder) @attributes_cache = {} - dirty = @changed_attributes.keys - @attributes.update(coder['attributes'].except(*dirty)) + dirty = @changed_attributes.keys + attributes = self.class.initialize_attributes(coder['attributes'].except(*dirty)) + @attributes.update(attributes) @changed_attributes.update(coder['attributes'].slice(*dirty)) @changed_attributes.delete_if{|k,v| v.eql? @attributes[k]} - set_serialized_attributes - run_callbacks :find self |