Module: Abbish::Sequel::Plugins::Model::RecordTimestamp::InstanceMethods

Defined in:
lib/model/record_timestamp.rb

Instance Method Summary collapse

Instance Method Details

#before_createObject



30
31
32
33
# File 'lib/model/record_timestamp.rb', line 30

def before_create
  self.record_created_time = _get_time if self.class.record_timestamp_options[:enabled]
  super
end

#before_updateObject



35
36
37
38
# File 'lib/model/record_timestamp.rb', line 35

def before_update
  self.record_updated_time = _get_time if self.class.record_timestamp_options[:enabled] if self.modified?
  super
end