Module: Sequel::Plugins::Timestamps::InstanceMethods

Defined in:
lib/sequel/plugins/timestamps.rb

Instance Method Summary collapse

Instance Method Details

#before_updateObject

Set the update timestamp when updating



74
75
76
77
# File 'lib/sequel/plugins/timestamps.rb', line 74

def before_update
  set_update_timestamp
  super
end

#before_validationObject

Set the create timestamp when creating



80
81
82
83
# File 'lib/sequel/plugins/timestamps.rb', line 80

def before_validation
  set_create_timestamp if new?
  super
end