Class: Specify::Model::Accession

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

Instance Method Summary collapse

Instance Method Details

#before_createObject


15
16
17
18
19
20
# File 'lib/specify/models/accession.rb', line 15

def before_create
  self.Version = 0
  self.TimestampCreated = Time.now
  # TODO: set created_by
  super
end

#before_updateObject


22
23
24
25
26
27
# File 'lib/specify/models/accession.rb', line 22

def before_update
  self.Version += 1
  self.TimestampModified = Time.now
  # TODO: set modified_by
  super
end