Module: Housekeeping
- Extended by:
- ActiveSupport::Concern
- Included in:
- AlternateValue, AssertedDistribution, Attribution, BiocurationClassification, BiologicalAssociation, BiologicalAssociationsBiologicalAssociationsGraph, BiologicalAssociationsGraph, BiologicalRelationship, BiologicalRelationshipType, CharacterState, Citation, CitationTopic, CollectingEvent, CollectionObject, CollectionObjectObservation, CollectionProfile, CommonName, Confidence, Container, ContainerItem, Content, ControlledVocabularyTerm, DataAttribute, DatasetRecord, Depiction, DerivedCollectionObject, Descriptor, Document, Documentation, Download, DwcOccurrence, Extract, FieldOccurrence, GeneAttribute, Georeference, Identifier, Image, ImportDataset, Label, Lead, Loan, LoanItem, Note, Observation, ObservationMatrix, ObservationMatrixColumn, ObservationMatrixColumnItem, ObservationMatrixRow, ObservationMatrixRowItem, OriginRelationship, Otu, OtuPageLayout, OtuPageLayoutSection, OtuRelationship, PinboardItem, ProjectSource, Protocol, ProtocolRelationship, PublicContent, RangedLotCategory, Role::AttributionRole, Role::ProjectRole, Sequence, SequenceRelationship, SledImage, SqedDepiction, Tag, TaggedSectionKeyword, TaxonDetermination, TaxonName, TaxonNameClassification, TaxonNameRelationship, TypeMaterial
- Defined in:
- lib/housekeeping.rb
Defined Under Namespace
Modules: CombinedScopes, Projects, Timestamps, Users
Instance Method Summary collapse
-
#has_polymorphic_relationship? ⇒ Boolean
TODO: method belongs in ApplicationEnumeration.
Instance Method Details
#has_polymorphic_relationship? ⇒ Boolean
TODO: method belongs in ApplicationEnumeration
13 14 15 |
# File 'lib/housekeeping.rb', line 13 def has_polymorphic_relationship? self.class.reflect_on_all_associations(:belongs_to).select { |a| a.polymorphic? }.count > 0 end |