Module: Mongoid::Safety::ClassMethods
- Defined in:
- lib/mongoid/safety.rb
Overview
:nodoc:
Instance Method Summary collapse
-
#safely(safety = true) ⇒ Proxy
Execute the following class-level persistence operation in safe mode.
-
#unsafely ⇒ Proxy
Execute the following class-level persistence operation without safe mode.
Instance Method Details
#safely(safety = true) ⇒ Proxy
Execute the following class-level persistence operation in safe mode.
86 87 88 |
# File 'lib/mongoid/safety.rb', line 86 def safely(safety = true) tap { Threaded. = safety } end |
#unsafely ⇒ Proxy
Execute the following class-level persistence operation without safe mode. Allows per-request overriding of safe mode when the persist_in_safe_mode config option is turned on.
100 101 102 |
# File 'lib/mongoid/safety.rb', line 100 def unsafely tap { Threaded. = false } end |