Sha256: d52f815a41c061ed71a58c7821f3852bce70a8a298e9efa4035f077c11e5b0c9

Contents?: true

Size: 464 Bytes

Versions: 7

Compression:

Stored size: 464 Bytes

Contents

module Georgia
  class ApplicationController < ActionController::Base

    before_filter :authenticate_user!
    layout :layout_by_resource

    protect_from_forgery

    def current_ability
      @current_ability ||= Ability.new(current_user)
    end

    def current_locale
      I18n.locale
    end
    helper_method :current_locale

    private

    def layout_by_resource
      devise_controller? ? "georgia/devise" : "georgia/application"
    end

  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
georgia-0.7.6 app/controllers/georgia/application_controller.rb
georgia-0.7.5 app/controllers/georgia/application_controller.rb
georgia-0.7.4 app/controllers/georgia/application_controller.rb
georgia-0.7.3 app/controllers/georgia/application_controller.rb
georgia-0.7.2 app/controllers/georgia/application_controller.rb
georgia-0.7.1 app/controllers/georgia/application_controller.rb
georgia-0.7.0 app/controllers/georgia/application_controller.rb