Sha256: d76ee32ab07b356000492662043b5048121beea9b590df0190afc9cacda7bc61
Contents?: true
Size: 457 Bytes
Versions: 1
Compression:
Stored size: 457 Bytes
Contents
module Pbw class ApplicationController < ActionController::Base respond_to :json rescue_from ::CanCan::AccessDenied do |exception| render json: {:error => exception.message}, status: 401 end rescue_from Mongoid::Errors::DocumentNotFound do |exception| render json: {:error => exception.message}, status: 404 end protected def current_ability @current_ability ||= Ability.new(current_user) end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
pbw-0.0.10 | app/controllers/pbw/application_controller.rb |