Class: Tasks::ObservationMatrices::ImageMatrixController

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

Instance Method Summary collapse

Methods included from TaskControllerConfiguration

#set_is_task_controller

Instance Method Details

#image_key_paramsObject (protected)

params[:observation_matrix_id, :project_id, :observation_matrix, :language_id, :keyword_ids, :row_filter,

:per, :page, :otu_filter, :identified_to_rank]


17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# File 'app/controllers/tasks/observation_matrices/image_matrix_controller.rb', line 17

def image_key_params
  params.permit(
      :observation_matrix_id,
      :language_id,
      :row_filter,
      :otu_filter,
      :sorting,
      :eliminate_unknown,
      :error_tolerance,
      :identified_to_rank,
      :selected_descriptors,
      :per,
      :page,
      keyword_ids: [] # arrays must be at the end
  ).to_h.symbolize_keys.merge(project_id: sessions_current_project_id)
end

#indexObject

GET /tasks/observation_matrices/image_matrix



5
6
# File 'app/controllers/tasks/observation_matrices/image_matrix_controller.rb', line 5

def index
end

#keyObject

GET /tasks/observation_matrices/image_matrix/37/key



9
10
11
# File 'app/controllers/tasks/observation_matrices/image_matrix_controller.rb', line 9

def key
  @key = Tools::ImageMatrix.new(**image_key_params)
end