Class: BiologicalProperty
- Inherits:
-
ControlledVocabularyTerm
- Object
- ActiveRecord::Base
- ApplicationRecord
- ControlledVocabularyTerm
- BiologicalProperty
- Includes:
- Shared::BiologicalAssociationIndexHooks
- Defined in:
- app/models/biological_property.rb
Overview
A biological property like “male”, “adult”, “host”, “parasite”.
Constant Summary
Constants inherited from ControlledVocabularyTerm
ControlledVocabularyTerm::ALTERNATE_VALUES_FOR
Constants included from SoftValidation
SoftValidation::ANCESTORS_WITH_SOFT_VALIDATIONS
Instance Attribute Summary
Attributes inherited from ControlledVocabularyTerm
#definition, #name, #project_id, #type, #uri, #uri_relation
Instance Method Summary collapse
-
#biological_association_indices ⇒ ActiveRecord::Relation
BiologicalAssociationIndex records for associations with relationships that use this property.
Methods inherited from ControlledVocabularyTerm
clone_from_project, #uri_relation_is_a_skos_relation
Methods included from SoftValidation
#clear_soft_validations, #fix_for, #fix_soft_validations, #soft_fixed?, #soft_valid?, #soft_validate, #soft_validated?, #soft_validations, #soft_validators
Methods included from Shared::IsData
#errors_excepting, #full_error_messages_excepting, #identical, #is_community?, #is_destroyable?, #is_editable?, #is_in_use?, #is_in_users_projects?, #metamorphosize, #similar
Methods included from Shared::HasPapertrail
#attribute_updated, #attribute_updater, #detect_version
Methods included from Shared::AlternateValues
#all_values_for, #alternate_valued?
Methods included from Shared::Uri
Methods included from Housekeeping
#has_polymorphic_relationship?
Methods inherited from ApplicationRecord
Instance Method Details
#biological_association_indices ⇒ ActiveRecord::Relation
Returns BiologicalAssociationIndex records for associations with relationships that use this property.
10 11 12 13 14 15 |
# File 'app/models/biological_property.rb', line 10 def biological_association_indices BiologicalAssociationIndex .joins('INNER JOIN biological_associations ba ON biological_association_indices.biological_association_id = ba.id') .joins('INNER JOIN biological_relationship_types brt ON brt.biological_relationship_id = ba.biological_relationship_id') .where('brt.biological_property_id = ?', id) end |