Class: Kk::Entry

Inherits:
Sequel::Model
  • Object
show all
Defined in:
lib/kk/entry.rb

Instance Method Summary collapse

Instance Method Details

#before_createObject



5
6
7
8
9
# File 'lib/kk/entry.rb', line 5

def before_create
  super
  now = DateTime.now
  self.created_at ||= now
end

#before_updateObject



11
12
13
14
15
# File 'lib/kk/entry.rb', line 11

def before_update
  super
  now = DateTime.now
  self.updated_at ||= now
end