Methods

Class/Module Index [+]

Quicksearch

Mongoid::Timestamps::Updated

This module handles the behaviour for setting up document updated at timestamp.

Public Instance Methods

set_updated_at() click to toggle source

Update the updated_at field on the Document to the current time. This is only called on create and on save.

@example Set the updated at time.

person.set_updated_at
# File lib/mongoid/timestamps/updated.rb, line 20
def set_updated_at
  self.updated_at = Time.now.utc unless self.updated_at_changed?
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.