module Mongoid::Timestamps::Timeless

def clear_timeless_option

Other tags:
    Since: - 3.1.4

Returns:
  • (true) - True.

Other tags:
    Example: Clear the timeless option. -
def clear_timeless_option
  if self.persisted?
    self.class.clear_timeless_option_on_update
  else
    self.class.clear_timeless_option
  end
  true
end

def timeless

Other tags:
    Since: - 2.3.0

Returns:
  • (Document) - The document this was called on.

Other tags:
    Example: Save a document but don't timestamp. -
def timeless
  self.class.timeless
  self
end

def timeless?

def timeless?
  self.class.timeless?
end

def timeless_table

def timeless_table
  Thread.current['[mongoid]:timeless'] ||= Hash.new
end