Module: CsvRecord::Timestamps
- Defined in:
- lib/csv_record/timestamps.rb
Overview
This module handles the behaviour for setting up document created at timestamp.
Class Method Summary collapse
Class Method Details
.included(receiver) ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/csv_record/timestamps.rb', line 4 def self.included(receiver) receiver.class_eval do attr_accessor :created_at, :updated_at before_create do set_created_at end after_update do set_updated_at end end end |