module Cequel::Record::Timestamps

This module provides `created_at` and `updated_at` functionality for records. It does this in two ways:

@example Record class with timestamps

class Blog
  include Cequel::Record
  key :subdomain, :text
  column :name, :text

  timestamps
end

@since 1.3.0

Private Instance Methods

set_created_and_updated_at() click to toggle source
# File lib/cequel/record/timestamps.rb, line 61
def set_created_and_updated_at
  now = Time.now
  self.created_at = now
  self.updated_at = now
end
set_updated_at() click to toggle source
# File lib/cequel/record/timestamps.rb, line 67
def set_updated_at
  self.updated_at = Time.now
end