Sha256: b0c7be43a83163d576ea3d37909392214b0c76933ae9bed8dcf0035a33cc3196

Contents?: true

Size: 577 Bytes

Versions: 20

Compression:

Stored size: 577 Bytes

Contents

# encoding: utf-8

module ConstructorCore
  class ApplicationController < ::ApplicationController
    layout 'constructor_core/application_core'
    before_filter :authenticate_user!, :except => [:show, :search]

    helper_method :current_user

    private

    def authenticate_user!
      warden.authenticate!
    end

    def user_signed_in?
      !!current_user
    end

    def current_user
      @current_user ||= warden.authenticate
    end

    def user_session
      current_user && warden.session
    end

    def warden
      request.env['warden']
    end
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
constructor-core-1.0.0beta1 app/controllers/constructor_core/application_controller.rb
constructor-core-0.9.1 app/controllers/constructor_core/application_controller.rb
constructor-core-0.9.0 app/controllers/constructor_core/application_controller.rb
constructor-core-0.8.19 app/controllers/constructor_core/application_controller.rb
constructor-core-0.8.18 app/controllers/constructor_core/application_controller.rb
constructor-core-0.8.17 app/controllers/constructor_core/application_controller.rb
constructor-core-0.8.16 app/controllers/constructor_core/application_controller.rb
constructor-core-0.8.15 app/controllers/constructor_core/application_controller.rb
constructor-core-0.8.14 app/controllers/constructor_core/application_controller.rb
constructor-core-0.8.13 app/controllers/constructor_core/application_controller.rb
constructor-core-0.8.12 app/controllers/constructor_core/application_controller.rb
constructor-core-0.8.11 app/controllers/constructor_core/application_controller.rb
constructor-core-0.8.10 app/controllers/constructor_core/application_controller.rb
constructor-core-0.8.8 app/controllers/constructor_core/application_controller.rb
constructor-core-0.8.7 app/controllers/constructor_core/application_controller.rb
constructor-core-0.8.6 app/controllers/constructor_core/application_controller.rb
constructor-core-0.8.5 app/controllers/constructor_core/application_controller.rb
constructor-core-0.8.4 app/controllers/constructor_core/application_controller.rb
constructor-core-0.8.3 app/controllers/constructor_core/application_controller.rb
constructor-core-0.8.2 app/controllers/constructor_core/application_controller.rb