Class: Tasks::Nomenclature::BrowseController

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

Instance Method Summary collapse

Methods included from TaskControllerConfiguration

#set_is_task_controller

Instance Method Details

#indexObject



4
5
6
7
8
9
10
# File 'app/controllers/tasks/nomenclature/browse_controller.rb', line 4

def index
  @taxon_name = TaxonName.where(project_id: sessions_current_project_id).find(params[:taxon_name_id]) if !params[:taxon_name_id].blank?
  @taxon_name ||= Project.find(sessions_current_project_id).root_taxon_name
  redirect_to :new_taxon_name_task, notice: 'No names to browse yet.' and return if @taxon_name.nil?

  @data = ::Catalog::Nomenclature::Entry.new(@taxon_name)
end