Class/Module Index [+]

Quicksearch

Mongoid::Relations::AutoSave

This module contains the behaviour for auto-saving relations in different collections.

Public Instance Methods

autosaved?() click to toggle source

Used to prevent infinite loops in associated autosaves.

@example Is the document autosaved?

document.autosaved?

@return [ true, false ] Has the document already been autosaved?

@since 3.0.0

# File lib/mongoid/relations/auto_save.rb, line 22
def autosaved?
  Threaded.autosaved?(self)
end
begin_autosave() click to toggle source

Begin the associated autosave.

@example Begin autosave.

document.begin_autosave

@since 3.0.0

# File lib/mongoid/relations/auto_save.rb, line 32
def begin_autosave
  Threaded.begin_autosave(self)
end
exit_autosave() click to toggle source

Exit the associated autosave.

@example Exit autosave.

document.exit_autosave

@since 3.0.0

# File lib/mongoid/relations/auto_save.rb, line 42
def exit_autosave
  Threaded.exit_autosave(self)
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.