Module: Shared::ProtocolRelationships

Extended by:
ActiveSupport::Concern
Included in:
CollectingEvent, CollectionObject, Extract, FieldOccurrence, Georeference, Image, Observation, Sequence, TaxonDetermination
Defined in:
app/models/concerns/shared/protocol_relationships.rb

Overview

Shared code for attaching protocols to data objects.

Instance Method Summary collapse

Instance Method Details

#protocolled?Boolean

Returns:

  • (Boolean)


18
19
20
# File 'app/models/concerns/shared/protocol_relationships.rb', line 18

def protocolled?
  protocols.any?
end

#reject_protocols(attributed) ⇒ Object (private)



24
25
26
# File 'app/models/concerns/shared/protocol_relationships.rb', line 24

def reject_protocols(attributed)
  attributed['name'].blank? || attributed['short_name'].blank? || attributed['description'].blank?
end