Sha256: 2b736a62cbf009ece9c6b213b01bc7cd93d91764863b0f3a60fc2f3d83f1db9b

Contents?: true

Size: 465 Bytes

Versions: 1

Compression:

Stored size: 465 Bytes

Contents

module Hitchens
  class ApplicationController < ActionController::Base
    check_authorization
    load_and_authorize_resource
    layout Hitchens.use_parent_layout ? 'application' : 'hitchens/application'

    def current_ability
      # we need to tell CanCan to use our Hitchens::Ability class
      @current_ability ||= Ability.new(get_current_user)
    end

  private
    def get_current_user
      __send__ Hitchens.current_user_helper_name
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
hitchens-0.0.1 app/controllers/hitchens/application_controller.rb