Class: Specify::Model::Preparation

Inherits:
Object
  • Object
show all
Defined in:
lib/specify/models/preparation.rb

Overview

Sequel::Model for preparations.

Instance Method Summary collapse

Instance Method Details

#before_createObject


19
20
21
22
23
24
# File 'lib/specify/models/preparation.rb', line 19

def before_create
  self.Version = 0
  self.TimestampCreated = Time.now
  self.GUID = SecureRandom.uuid
  super
end

#before_updateObject


26
27
28
29
30
# File 'lib/specify/models/preparation.rb', line 26

def before_update
  self.Version += 1
  self.TimestampModified = Time.now
  super
end