Class: Tasks::DwcOccurrences::StatusController

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

Instance Method Summary collapse

Methods included from TaskControllerConfiguration

#set_is_task_controller

Instance Method Details

#indexObject

after_action -> { set_pagination_headers(:dwc_occurrences) }, only: [:index]



6
7
8
9
10
11
12
13
14
# File 'app/controllers/tasks/dwc_occurrences/status_controller.rb', line 6

def index
  @dwc_occurrences_query = Queries::DwcOccurrence::Filter.new(params)

  @dwc_occurrences =  @dwc_occurrences_query.all
    .where(project_id: sessions_current_project_id)
    .select(:id, :updated_at, :dwc_occurrence_object_type, :dwc_occurrence_object_id, :scientificName, :fieldNumber)
    .page(params[:page])
    .per(params[:per] || 200)
end