Sha256: 3438e542d2bea5816e94bf760ae86495c61ae3f21300ccb76dbec1bd7240e608
Contents?: true
Size: 463 Bytes
Versions: 10
Compression:
Stored size: 463 Bytes
Contents
module Peek class ResultsController < ApplicationController before_filter :restrict_non_access respond_to :json def show if request.xhr? render :json => Peek.adapter.get(params[:request_id]) else render :nothing => true, :status => :not_found end end private def restrict_non_access unless peek_enabled? raise ActionController::RoutingError.new('Not Found') end end end end
Version data entries
10 entries across 10 versions & 1 rubygems