Method deprecated or moved
This method is deprecated or moved on the latest stable version.
The last existing version (v3.2.13) is shown here.
reinit_with(coder)
public
Reinitialize an Identity Map model object from coder.
coder must contain the attributes necessary for initializing an
empty model object.
# File activerecord/lib/active_record/identity_map.rb, line 118
def reinit_with(coder)
@attributes_cache = {}
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]}
run_callbacks :find
self
end