Module: Shared::Identifiers

Extended by:
ActiveSupport::Concern
Included in:
BiologicalAssociation, CharacterState, CollectingEvent, CollectionObject, CollectionProfile, CommonName, Container, Descriptor, Document, Documentation, Extract, GeneAttribute, Image, Loan, Observation, ObservationMatrix, ObservationMatrixColumnItem, ObservationMatrixRow, ObservationMatrixRowItem, Otu, Person, Sequence, SequenceRelationship, Serial, Source, TaxonName, TypeMaterial, User
Defined in:
app/models/concerns/shared/identifiers.rb

Overview

Shared code for objects that have Identifiers.

Defined Under Namespace

Modules: ClassMethods

Instance Method Summary (collapse)

Instance Method Details

- (Boolean) identified?

Returns:

  • (Boolean)


80
81
82
# File 'app/models/concerns/shared/identifiers.rb', line 80

def identified?
  self.identifiers.any?
end

- (Object) reject_identifiers(attributed) (protected)



86
87
88
# File 'app/models/concerns/shared/identifiers.rb', line 86

def reject_identifiers(attributed)
  attributed['identifier'].blank? || attributed['type'].blank?
end