Class: Tasks::ObservationMatrices::ObservationMatrixHubController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- Tasks::ObservationMatrices::ObservationMatrixHubController
- Includes:
- TaskControllerConfiguration
- Defined in:
- app/controllers/tasks/observation_matrices/observation_matrix_hub_controller.rb
Instance Method Summary collapse
Methods included from TaskControllerConfiguration
Instance Method Details
#copy_observations ⇒ Object
9 10 11 12 13 14 15 |
# File 'app/controllers/tasks/observation_matrices/observation_matrix_hub_controller.rb', line 9 def copy_observations if Observation.copy(params[:old_global_id], params[:new_global_id]) render json: {success: true, status: :created} else render json: {success: false, status: :unprocessable_entity } end end |
#index ⇒ Object
GET
5 6 7 |
# File 'app/controllers/tasks/observation_matrices/observation_matrix_hub_controller.rb', line 5 def index @observation_matrices = ObservationMatrix.where(project_id: sessions_current_project_id).order(updated_at: :desc) end |