Module: ObservationMatricesHelper

Defined in:
app/helpers/observation_matrices_helper.rb

Instance Method Summary (collapse)

Instance Method Details

- (Object) keywords_on_addable_column_items



21
22
23
# File 'app/helpers/observation_matrices_helper.rb', line 21

def keywords_on_addable_column_items
  Keyword.joins(:tags).where(project_id: sessions_current_project_id).where(tags: {tag_object_type: 'Descriptor'}).distinct.all
end

- (Object) keywords_on_addable_row_items



17
18
19
# File 'app/helpers/observation_matrices_helper.rb', line 17

def keywords_on_addable_row_items
  Keyword.joins(:tags).where(project_id: sessions_current_project_id).where(tags: {tag_object_type: ['Otu', 'CollectionObject']}).distinct.all
end

- (Object) observation_matrices_search_form



8
9
10
# File 'app/helpers/observation_matrices_helper.rb', line 8

def observation_matrices_search_form
  render('/observation_matrices/quick_search_form')
end


12
13
14
15
# File 'app/helpers/observation_matrices_helper.rb', line 12

def observation_matrix_link(observation_matrix)
  return nil if observation_matrix.nil?
  link_to(observation_matrix_tag(observation_matrix).html_safe, observation_matrix)
end

- (Object) observation_matrix_tag(observation_matrix)



3
4
5
6
# File 'app/helpers/observation_matrices_helper.rb', line 3

def observation_matrix_tag(observation_matrix)
  return nil if observation_matrix.nil?
  observation_matrix.name
end