Class/Module Index [+]

Quicksearch

Mongoid::Timestamps::Timeless

This module adds behaviour for turning off timestamping in single or multiple calls.

Public Instance Methods

clear_timeless_option() click to toggle source

Clears out the timeless option.

@example Clear the timeless option.

document.clear_timeless_option

@return [ true ] True.

@since 3.1.4

# File lib/mongoid/timestamps/timeless.rb, line 22
def clear_timeless_option
  self.class.timestamping = true
end
timeless() click to toggle source

Begin an execution that should skip timestamping.

@example Save a document but don't timestamp.

person.timeless.save

@return [ Document ] The document this was called on.

@since 2.3.0

# File lib/mongoid/timestamps/timeless.rb, line 34
def timeless
  self.class.timestamping = false
  self
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.