aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2011-12-22 23:08:19 -0800
committerJosé Valim <jose.valim@gmail.com>2011-12-22 23:08:19 -0800
commit35ded6fd088074acb239d0976e9e19c69512b246 (patch)
tree71848b65a89773f547eba7f2d7de6022c38fabd0
parent5f2bfce9e0f4e9995c341ca27320e32ae0d9880f (diff)
parent96c38eca23652ac40df26aac5dd48e214cb570cf (diff)
downloadrails-35ded6fd088074acb239d0976e9e19c69512b246.tar.gz
rails-35ded6fd088074acb239d0976e9e19c69512b246.tar.bz2
rails-35ded6fd088074acb239d0976e9e19c69512b246.zip
Merge pull request #4141 from arunagw/fix_build
Fix build 3-2-stable
-rw-r--r--activerecord/lib/active_record/identity_map.rb7
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