Class: Tasks::Accessions::ComprehensiveController

Inherits:
ApplicationController
  • Object
show all
Includes:
TaskControllerConfiguration
Defined in:
app/controllers/tasks/accessions/comprehensive_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
# File 'app/controllers/tasks/accessions/comprehensive_controller.rb', line 5

def index
  if params[:dwc_occurrence_id]
    dwc_occurrence = DwcOccurrence.where(project_id: sessions_current_project_id).find(params[:dwc_occurrence_id])
    if dwc_occurrence.dwc_occurrence_object_type == 'CollectionObject'
      redirect_to comprehensive_collection_object_task_path(collection_object_id: dwc_occurrence.dwc_occurrence_object_id) and return
    end
  end
end