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

#indexObject

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[:observation_matrix_id] ? q.find(params[:observation_matrix_id]) : q.first
  redirect_to new_observation_matrix_path and return if @observation_matrix.nil? || @observation_matrix.cell_count > 10000
end