Class: ObservationMatrixColumnItem::Dynamic::Tag
- Inherits:
-
ObservationMatrixColumnItem::Dynamic
- Object
- ActiveRecord::Base
- ApplicationRecord
- ObservationMatrixColumnItem
- ObservationMatrixColumnItem::Dynamic
- ObservationMatrixColumnItem::Dynamic::Tag
- Defined in:
- app/models/observation_matrix_column_item/dynamic/tag.rb
Overview
Adds columns to matrix for descriptors tagged with the Keyword
Constant Summary
Constants inherited from ObservationMatrixColumnItem
Instance Attribute Summary
Attributes inherited from ObservationMatrixColumnItem
#controlled_vocabulary_term_id, #descriptor_id, #observation_matrix_id, #position, #type
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from ObservationMatrixColumnItem::Dynamic
Methods inherited from ObservationMatrixColumnItem
batch_create, batch_create_by_descriptor_id, batch_create_by_observation_matrix_column_item_id, batch_create_from_observation_matrix, batch_create_from_pinboard, batch_create_from_tags, #cleanup_matrix_columns, #cleanup_single_matrix_column, #column_objects, create_for, create_for_pinboard_items, create_for_tags, #decrement_matrix_column_reference_count, #find_or_build_column, human_name, #increment_matrix_column_reference_count, #is_dynamic?, #other_subclass_attributes_not_set, #update_matrix_columns, #update_single_matrix_column
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::Tags
#reject_tags, #tag_with, #tagged?, #tagged_with?
Methods included from Shared::Notes
#concatenated_notes_string, #reject_notes
Methods included from Shared::Identifiers
#dwc_occurrence_id, #identified?, #next_by_identifier, #previous_by_identifier, #reject_identifiers, #uri, #uuid
Methods included from Housekeeping
#has_polymorphic_relationship?
Methods inherited from ApplicationRecord
Class Method Details
.subclass_attributes ⇒ Object
10 11 12 |
# File 'app/models/observation_matrix_column_item/dynamic/tag.rb', line 10 def self.subclass_attributes [:controlled_vocabulary_term_id] end |
Instance Method Details
#descriptors ⇒ Object
14 15 16 |
# File 'app/models/observation_matrix_column_item/dynamic/tag.rb', line 14 def descriptors Descriptor.joins(:tags).where(tags: {keyword: controlled_vocabulary_term}).to_a end |