Module: Ripple::Timestamps

Extended by:
ActiveSupport::Concern
Defined in:
lib/ripple/timestamps.rb

Overview

Adds automatic creation and update timestamps to a Document model.

Defined Under Namespace

Modules: ClassMethods

Instance Method Summary collapse

Instance Method Details

#touchObject

Sets the :updated_at attribute before saving the document.



21
22
23
# File 'lib/ripple/timestamps.rb', line 21

def touch
  self.updated_at = Time.now
end