Method: Mongoid::Threaded#disable_identity_map
- Defined in:
- lib/mongoid/threaded.rb
#disable_identity_map(option) ⇒ Object
Disable the identity map on either the current thread or all threads.
203 204 205 206 207 208 209 210 211 |
# File 'lib/mongoid/threaded.rb', line 203 def disable_identity_map(option) if option == :all Thread.list.each do |thread| thread["[mongoid]:identity-map-enabled"] = false end else Thread.current["[mongoid]:identity-map-enabled"] = false end end |