Class: Inferno::Web::Controllers::TestSessions::Results::Index

Inherits:
Controller
  • Object
show all
Defined in:
lib/inferno/apps/web/controllers/test_sessions/results/index.rb

Instance Method Summary collapse

Methods inherited from Controller

call, resource_class, resource_name

Instance Method Details

#handle(req, res) ⇒ Object



9
10
11
12
13
14
15
16
# File 'lib/inferno/apps/web/controllers/test_sessions/results/index.rb', line 9

def handle(req, res)
  res.body =
    if req.params[:all] == 'true'
      serialize(test_sessions_repo.results_for_test_session(req.params[:id]))
    else
      serialize(repo.current_results_for_test_session(req.params[:id]))
    end
end