Module: Ripple::Timestamps::ClassMethods
- Defined in:
- ripple/lib/ripple/timestamps.rb
Instance Method Summary (collapse)
-
- (Object) timestamps!
Adds the :created_at and :updated_at timestamp properties to the document.
Instance Method Details
- (Object) timestamps!
Adds the :created_at and :updated_at timestamp properties to the document.
26 27 28 29 30 |
# File 'ripple/lib/ripple/timestamps.rb', line 26 def property :created_at, Time, :default => proc { Time.now } property :updated_at, Time before_save :touch end |