Class: Tasks::CollectionObjects::DwcMediaExtensionPreviewController

Inherits:
ApplicationController
  • Object
show all
Includes:
TaskControllerConfiguration
Defined in:
app/controllers/tasks/collection_objects/dwc_media_extension_preview_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/collection_objects/dwc_media_extension_preview_controller.rb', line 4

def index
  @collection_objects_query = ::Queries::CollectionObject::Filter.new(params)
  @collection_objects = @collection_objects_query.all
    .includes(:images, :sounds, observations: :images, taxon_determination: {otu: :taxon_name})
    .order(:id)
    .page(params[:page]).per(params[:per])
end