Skip to content

Commit

Permalink
copy over columns hash on reload
Browse files Browse the repository at this point in the history
  • Loading branch information
tenderlove committed Feb 7, 2012
1 parent d592ea3 commit ab6ebcc
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions activerecord/lib/active_record/persistence.rb
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,7 @@ def reload(options = nil)
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 = {}
Expand Down

0 comments on commit ab6ebcc

Please sign in to comment.