Module: ActiveRecord::Base::IdentityMap::IdMapClassMethods

Defined in:
lib/identity_map/active_record/base.rb

Overview

:enddoc:

Instance Method Summary collapse

Instance Method Details

#id_mapObject



37
38
39
# File 'lib/identity_map/active_record/base.rb', line 37

def id_map
  thread_id_map.try(:for_class, self)
end

#if_id_map {|map| ... } ⇒ Object

Yields:

  • (map)


41
42
43
44
# File 'lib/identity_map/active_record/base.rb', line 41

def if_id_map
  map = id_map
  yield map if map
end