Module: Mongoid::Relations::AutoSave
- Extended by:
- ActiveSupport::Concern
- Included in:
- Mongoid::Relations
- Defined in:
- lib/mongoid/relations/auto_save.rb
Overview
This module contains the behaviour for auto-saving relations in different collections.
Defined Under Namespace
Modules: ClassMethods
Instance Method Summary collapse
-
#autosaved? ⇒ true, false
Used to prevent infinite loops in associated autosaves.
-
#begin_autosave ⇒ Object
Begin the associated autosave.
-
#exit_autosave ⇒ Object
Exit the associated autosave.
Instance Method Details
#autosaved? ⇒ true, false
Used to prevent infinite loops in associated autosaves.
23 24 25 |
# File 'lib/mongoid/relations/auto_save.rb', line 23 def autosaved? Threaded.autosaved?(self) end |
#begin_autosave ⇒ Object
Begin the associated autosave.
33 34 35 |
# File 'lib/mongoid/relations/auto_save.rb', line 33 def begin_autosave Threaded.begin_autosave(self) end |
#exit_autosave ⇒ Object
Exit the associated autosave.
43 44 45 |
# File 'lib/mongoid/relations/auto_save.rb', line 43 def exit_autosave Threaded.exit_autosave(self) end |