aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2012-02-06 17:10:44 -0800
committerAaron Patterson <aaron.patterson@gmail.com>2012-02-07 13:51:53 -0800
commitab6ebcceb1052f55ff8a93cf2a80b79f32c50ee9 (patch)
tree8223e527629886930d1ad4c928db8f5d7a232095
parentd592ea3b02c7e0952b87b876ad92bd1b453543c8 (diff)
downloadrails-ab6ebcceb1052f55ff8a93cf2a80b79f32c50ee9.tar.gz
rails-ab6ebcceb1052f55ff8a93cf2a80b79f32c50ee9.tar.bz2
rails-ab6ebcceb1052f55ff8a93cf2a80b79f32c50ee9.zip
copy over columns hash on reload
-rw-r--r--activerecord/lib/active_record/persistence.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/persistence.rb b/activerecord/lib/active_record/persistence.rb
index 09ee2ba61d..9bc046c775 100644
--- a/activerecord/lib/active_record/persistence.rb
+++ b/activerecord/lib/active_record/persistence.rb
@@ -287,6 +287,7 @@ module ActiveRecord
IdentityMap.without do
fresh_object = self.class.unscoped { self.class.find(id, options) }
@attributes.update(fresh_object.instance_variable_get('@attributes'))
+ @columns_hash = fresh_object.instance_variable_get('@columns_hash')
end
@attributes_cache = {}