Class: Tasks::Nomenclature::BrowseController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- Tasks::Nomenclature::BrowseController
- Includes:
- TaskControllerConfiguration
- Defined in:
- app/controllers/tasks/nomenclature/browse_controller.rb
Instance Method Summary collapse
Methods included from TaskControllerConfiguration
Instance Method Details
#index ⇒ Object
4 5 6 7 8 9 10 11 12 |
# File 'app/controllers/tasks/nomenclature/browse_controller.rb', line 4 def index id = params[:taxon_name_id] || params[:combination_id] @taxon_name = TaxonName.where(project_id: sessions_current_project_id).find(id) if id.present? @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 |