Class: Tasks::Accessions::Report::DwcController

Inherits:
ApplicationController
  • Object
show all
Includes:
TaskControllerConfiguration
Defined in:
app/controllers/tasks/accessions/report/dwc_controller.rb

Overview

DEPRECATED!

Instance Method Summary collapse

Methods included from TaskControllerConfiguration

#set_is_task_controller

Instance Method Details

#indexObject

tasks/accessions/report/dwc



6
7
8
9
10
11
12
13
14
15
16
17
18
19
# File 'app/controllers/tasks/accessions/report/dwc_controller.rb', line 6

def index
  respond_to do |format|
    format.html do
      @collection_objects = CollectionObject.order(:id).includes(:dwc_occurrence).with_project_id(sessions_current_project_id).page(params[:page]).per(params[:per] || 30)
    end

    # TODO: this is replaced with /collection_objects/report
    format.json {
      # TEMPORARY HACK! To be resolved with proper filter params at some points
      # Currently only used in digitize recent modal
      @collection_objects = CollectionObject.where(project_id: sessions_current_project_id).order(updated_at: :desc).includes(:dwc_occurrence).page(params[:page]).per(params[:per] || 30)
    }
  end
end

#rowObject

TODO: doesn’t belong here.



22
23
24
# File 'app/controllers/tasks/accessions/report/dwc_controller.rb', line 22

def row
  @dwc_occurrence = CollectionObject.includes(:dwc_occurrence).find(params[:id]).get_dwc_occurrence # find or compute for
end