Class: Tasks::ObservationMatrices::InteractiveKeyController

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

Instance Method Summary collapse

Methods included from TaskControllerConfiguration

#set_is_task_controller

Instance Method Details

#api_keyObject

GET /api/v1/observation_matrices/123/key.json



14
15
16
17
# File 'app/controllers/tasks/observation_matrices/interactive_key_controller.rb', line 14

def api_key
  @key = Tools::InteractiveKey.new(**key_params)
  render '/tasks/observation_matrices/interactive_key/key'
end

#indexObject

GET /tasks/observation_matrices/interactive_key



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

def index
end

#keyObject

GET /tasks/observation_matrices/interactive_key/37/key



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

def key
  @key = Tools::InteractiveKey.new(**key_params)
end

#key_paramsObject (protected)

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

:sorting, :eliminate_unknown, :error_tolerance, :identified_to_rank, :selected_descriptors]


23
24
25
26
27
28
29
30
31
32
33
34
35
36
# File 'app/controllers/tasks/observation_matrices/interactive_key_controller.rb', line 23

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