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



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

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

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

Yields:

  • (map)


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

def if_id_map
  map = id_map
  yield map if map
end