Sha256: 0db66eef12b331fb3fa00bd715b8e0852c6d9addb624ea0350d583ad65d66bd2
Contents?: true
Size: 527 Bytes
Versions: 17
Compression:
Stored size: 527 Bytes
Contents
module Peek class ResultsController < ApplicationController before_action :restrict_non_access 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 private def restrict_non_access unless peek_enabled? raise ActionController::RoutingError.new('Not Found') end end end end
Version data entries
17 entries across 13 versions & 3 rubygems