Class: Peek::ResultsController

Inherits:
ApplicationController
  • Object
show all
Defined in:
app/controllers/peek/results_controller.rb

Instance Method Summary collapse

Instance Method Details

#showObject



5
6
7
8
9
10
11
12
13
14
15
# File 'app/controllers/peek/results_controller.rb', line 5

def show
  respond_to do |format|
    format.json do
      if request.xhr?
        render json: Peek.adapter.get(params[:request_id])
      else
        render nothing: true, status: :not_found
      end
    end
  end
end