Class: ObservationMatrixRowItem::TaxonNameRowItem

Inherits:
ObservationMatrixRowItem show all
Defined in:
app/models/observation_matrix_row_item/taxon_name_row_item.rb

Overview

The intent is to capture all OTUs linked through a TaxonName Hierarchy

Constant Summary

Constants inherited from ObservationMatrixRowItem

ALL_STI_ATTRIBUTES

Instance Attribute Summary

Attributes inherited from ObservationMatrixRowItem

#cached_observation_matrix_row_item_id, #collection_object_id, #observation_matrix_id, #otu_id, #position

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from ObservationMatrixRowItem

batch_create, batch_create_from_pinboard, batch_create_from_tags, #cleanup_matrix_rows, #cleanup_single_matrix_row, create_for, create_for_pinboard_items, create_for_tags, #decrement_matrix_row_reference_count, human_name, #increment_matrix_row_reference_count, #object_is?, #other_subclass_attributes_not_set, #type_is_subclassed, #update_matrix_rows, #update_single_matrix_row

Methods included from Housekeeping

#has_polymorphic_relationship?

Class Method Details

.subclass_attributesObject



10
11
12
# File 'app/models/observation_matrix_row_item/taxon_name_row_item.rb', line 10

def self.subclass_attributes
  [:taxon_name_id]
end

Instance Method Details

#collection_objectsObject



18
19
20
# File 'app/models/observation_matrix_row_item/taxon_name_row_item.rb', line 18

def collection_objects
  CollectionObject.none
end

#is_dynamic?Boolean

Returns:

  • (Boolean)


26
27
28
# File 'app/models/observation_matrix_row_item/taxon_name_row_item.rb', line 26

def is_dynamic?
  true
end

#matrix_row_item_objectObject



22
23
24
# File 'app/models/observation_matrix_row_item/taxon_name_row_item.rb', line 22

def matrix_row_item_object
  taxon_name 
end

#otusObject



14
15
16
# File 'app/models/observation_matrix_row_item/taxon_name_row_item.rb', line 14

def otus
  Otu.joins(:taxon_name).where(taxon_name: taxon_name.self_and_descendants)
end