Module: MassiveRecord::ORM::IdentityMap::InstanceMethods

Defined in:
lib/massive_record/orm/identity_map.rb

Instance Method Summary collapse

Instance Method Details

#change_id!(new_id) ⇒ Object



202
203
204
205
# File 'lib/massive_record/orm/identity_map.rb', line 202

def change_id!(new_id)
  IdentityMap.remove(self)
  super
end

#destroyObject Also known as: delete



195
196
197
198
199
# File 'lib/massive_record/orm/identity_map.rb', line 195

def destroy
  return super unless IdentityMap.enabled?

  super.tap { IdentityMap.remove(self) }
end

#reloadObject



190
191
192
193
# File 'lib/massive_record/orm/identity_map.rb', line 190

def reload
  IdentityMap.remove(self) if IdentityMap.enabled?
  super
end