Class: Specify::Model::CollectingEvent

Inherits:
Object
  • Object
show all
Includes:
Createable, Updateable
Defined in:
lib/specify/models/collecting_event.rb

Overview

CollectingEvents hold information about when, where, how, and by whom a Specify::Model::CollectionObject was collected.

A CollectingEvent takes place in (has one) Specify::Model::Locality (where it was collected).

A CollectingEvent can have one or many #collection_objects, depending on the value of Specify::Model::Collection#embedded_collecting_event? for the collection an associated CollectionObject belongs to.

Instance Method Summary collapse

Methods included from Updateable

#before_update

Instance Method Details

#before_createObject

Sequel hook that assigns a GUID.



32
33
34
35
# File 'lib/specify/models/collecting_event.rb', line 32

def before_create
  self[:GUID] = SecureRandom.uuid
  super
end