Class: Panels::StatisticsController

Inherits:
Applicants::ApplicationController
  • Object
show all
Defined in:
app/controllers/applicants/panels/statistics_controller.rb

Instance Method Summary collapse

Instance Method Details

#showObject



5
6
7
8
9
10
11
12
13
14
15
16
17
# File 'app/controllers/applicants/panels/statistics_controller.rb', line 5

def show
  panel = Applicants::Panel.where(remote_panel_id: params[:panel_id]).first

  if panel
    respond_to do |format|
      format.json { render json: panel.statistics.as_json }
    end
  else
    respond_to do |format|
      format.json { head :not_found }
    end
  end
end