Sha256: f1a7706766ed3217f9fefbcc6189fea76cdf37ae8365befdb0bd39ff51cda2dc
Contents?: true
Size: 367 Bytes
Versions: 8
Compression:
Stored size: 367 Bytes
Contents
module Dolly module Timestamps def timestamps! property :created_at, :updated_at, class_name: Time self.timestamps[self.name] = true self.class_eval do def set_created_at doc['created_at'] ||= Time.now end def set_updated_at doc['updated_at'] = Time.now end end end end end
Version data entries
8 entries across 8 versions & 1 rubygems