Class: Tasks::Content::ByNomenclatureController

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

Instance Method Summary collapse

Methods included from TaskControllerConfiguration

#set_is_task_controller

Instance Method Details

#indexObject

GET



5
6
7
8
9
10
11
12
13
14
15
16
# File 'app/controllers/tasks/content/by_nomenclature_controller.rb', line 5

def index
  @taxon_names = TaxonName
    .select('taxon_names.*, taxon_name_hierarchies.generations')
    .that_is_valid
    .with_base_of_rank_class("NomenclaturalRank::Iczn::SpeciesGroup::S")
    .joins(:descendant_hierarchies)
    .where(project_id: sessions_current_project_id)
    .order('taxon_name_hierarchies.generations, taxon_names.cached')
    .distinct

  @topic = Topic.where(project_id: sessions_current_project_id).where(id: params[:topic_id]).first
end