module Abbish::Sequel::Plugins::Model::SuperRecord::Timestamp::InstanceMethods

Public Instance Methods

before_create() click to toggle source
Calls superclass method
# File lib/model/super_record/timestamp.rb, line 34
def before_create
  send("#{self.class.record_timestamp_options[:feature_column_created_time]}=", _get_time) if self.class.record_timestamp_options[:enabled]
  super
end
before_update() click to toggle source
Calls superclass method
# File lib/model/super_record/timestamp.rb, line 39
def before_update
  send("#{self.class.record_timestamp_options[:feature_column_updated_time]}=", _get_time) if self.class.record_timestamp_options[:enabled] if self.modified?
  super
end

Private Instance Methods

_get_time() click to toggle source
# File lib/model/super_record/timestamp.rb, line 46
def _get_time
  return Time.now
end