Class: Specify::Model::CollectingEvent

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

Instance Method Summary collapse

Instance Method Details

#before_createObject



19
20
21
22
23
24
# File 'lib/specify/models/collecting_event.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
31
# File 'lib/specify/models/collecting_event.rb', line 26

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