Class: Tasks::AssertedDistributions::BasicEndemismController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- Tasks::AssertedDistributions::BasicEndemismController
- Includes:
- TaskControllerConfiguration
- Defined in:
- app/controllers/tasks/asserted_distributions/basic_endemism_controller.rb
Instance Method Summary collapse
-
#index ⇒ Object
GET.
Methods included from TaskControllerConfiguration
Instance Method Details
#index ⇒ Object
GET
5 6 7 8 9 10 11 12 13 |
# File 'app/controllers/tasks/asserted_distributions/basic_endemism_controller.rb', line 5 def index @taxon_name = TaxonName.where(project_id: sessions_current_project_id).find(params[:taxon_name_id]) if params[:taxon_name_id].present? @taxon_name ||= sessions_current_project.root_taxon_name @geographic_area = GeographicArea.find(params[:geographic_area_id]) if params[:geographic_area_id].present? @geographic_area ||= GeographicArea.first @data = TaxonWorks::Analysis::AssertedDistribution::BasicEndemism.quick_endemism(@taxon_name, @geographic_area) end |