Class: Tasks::CollectionObjects::ClassificationSummaryController

Inherits:
ApplicationController
  • Object
show all
Includes:
TaskControllerConfiguration
Defined in:
app/controllers/tasks/collection_objects/classification_summary_controller.rb

Instance Method Summary collapse

Methods included from TaskControllerConfiguration

#set_is_task_controller

Instance Method Details

#indexObject

GET



5
6
# File 'app/controllers/tasks/collection_objects/classification_summary_controller.rb', line 5

def index
end

#reportObject



8
9
10
11
12
13
14
15
16
17
# File 'app/controllers/tasks/collection_objects/classification_summary_controller.rb', line 8

def report
  @ancestor = TaxonName.where(project_id: sessions_current_project_id).where(id: params[:taxon_name_id]).first
  @ancestor ||= sessions_current_project.root_taxon_name
  @data = ::Queries::TaxonName::Filter.new(
    taxon_name_id: @ancestor.id,
    descendants: true,
    rank: params[:rank])
    .all.order(:cached)
  @rank = params[:rank]
end