Module: Ohm::Timestamps
- Defined in:
- lib/ohm/timestamps.rb
Overview
Provides created_at / updated_at timestamps.
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
Instance Method Details
#save ⇒ Object
26 27 28 29 30 31 |
# File 'lib/ohm/timestamps.rb', line 26 def save self.created_at = Time.now.utc.to_i if new? self.updated_at = Time.now.utc.to_i super end |