Class: Tasks::ObservationMatrices::ViewController

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

Instance Method Summary (collapse)

Methods included from TaskControllerConfiguration

#set_is_task_controller

Instance Method Details

- (Object) index

GET



5
6
7
8
9
# File 'app/controllers/tasks/observation_matrices/view_controller.rb', line 5

def index
  q = ObservationMatrix.where(project_id: sessions_current_project_id)
  @observation_matrix = params[:id] ? q.find(params[:id]) : q.first
  redirect_to new_observation_matrix_task_path and return if @observation_matrix.nil? || @observation_matrix.cell_count > 10000
end