Class: Observation

Inherits:
ApplicationRecord show all
Includes:
Housekeeping, Shared::Citable, Shared::Confidence, Shared::DataAttributes, Shared::Depictions, Shared::Identifiable, Shared::IsData, Shared::Notable, Shared::Taggable
Defined in:
app/models/observation.rb

Direct Known Subclasses

Continuous, PresenceAbsence, Qualitative, Sample

Defined Under Namespace

Classes: Continuous, PresenceAbsence, Qualitative, Sample

Class Method Summary (collapse)

Instance Method Summary (collapse)

Methods included from Housekeeping

#has_polymorphic_relationship?

Methods included from ActiverecordUtilities

#trim_attributes

Class Method Details

+ (Object) human_name



20
21
22
# File 'app/models/observation.rb', line 20

def self.human_name
  'YAY'
end

Instance Method Details

- (Object) otu_or_collection_object_set (protected)



26
27
28
29
30
# File 'app/models/observation.rb', line 26

def otu_or_collection_object_set
  if otu_id.blank? && collection_object_id.blank? && otu.blank? && collection_object.blank?
    errors.add(:base, 'observations must reference an Otu or collection object')
  end
end