Module: Mongoid::Threaded::Lifecycle::ClassMethods
- Defined in:
- lib/mongoid/threaded/lifecycle.rb
Overview
:nodoc:
Instance Method Summary collapse
-
#_creating ⇒ Object
Execute a block in creating mode.
-
#_loading_revision? ⇒ true, false
Is the current thread in loading revision mode?.
Instance Method Details
#_creating ⇒ Object
Execute a block in creating mode.
171 172 173 174 175 176 177 |
# File 'lib/mongoid/threaded/lifecycle.rb', line 171 def _creating Threaded.begin(:create) yield ensure Threaded.exit(:create) Threaded. end |
#_loading_revision? ⇒ true, false
Is the current thread in loading revision mode?
187 188 189 |
# File 'lib/mongoid/threaded/lifecycle.rb', line 187 def _loading_revision? Threaded.executing?(:load_revision) end |