Module: Abbish::Sequel::Plugins::Model::RecordTimestamp::InstanceMethods
- Defined in:
- lib/model/record_timestamp.rb
Instance Method Summary collapse
Instance Method Details
#before_create ⇒ Object
30 31 32 33 |
# File 'lib/model/record_timestamp.rb', line 30 def before_create super self.record_created_time = _get_time if self.class.[:enabled] end |
#before_update ⇒ Object
35 36 37 38 39 40 41 42 |
# File 'lib/model/record_timestamp.rb', line 35 def before_update super if self.modified? self.record_updated_time = _get_time if self.class.[:enabled] end end |