Sha256: cd1219d361e633f6d5c7105a0dc92f8a4987de4d3efee5c75aee3f24ad9063f1

Contents?: true

Size: 531 Bytes

Versions: 2

Compression:

Stored size: 531 Bytes

Contents

module Documentation
  class ApplicationController < ActionController::Base
    
    rescue_from Documentation::AccessDeniedError do |e|
      render :template => 'documentation/shared/access_denied', :layout => false
    end
    
    rescue_from ActiveRecord::RecordNotFound do |e|
      render :template => 'documentation/shared/not_found', :layout => false
    end
    
    private
    
    def authorizer
      @authorizer ||= Documentation.config.authorizer.new(self)
    end
    
    helper_method :authorizer
    
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
documentation-1.0.1 app/controllers/documentation/application_controller.rb
documentation-1.0.0 app/controllers/documentation/application_controller.rb