Sha256: 711b50eeaac93b3534ce8fa3f22636ee8955b3a10246747c516ea47396271050

Contents?: true

Size: 551 Bytes

Versions: 16

Compression:

Stored size: 551 Bytes

Contents

module Concen
  class ApplicationController < ActionController::Base
    protect_from_forgery

    layout "concen/application"

    before_filter :set_concen

    helper_method :current_concen_user, :authenticate_concen_user

    protected

    def set_concen
      @concen = true
    end

    def current_concen_user
      @current_concen_user ||= User.where(:auth_token => cookies[:auth_token]).first if cookies[:auth_token]
    end

    def authenticate_concen_user
      redirect_to concen_signin_path unless current_concen_user
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
concen-0.2.7 app/controllers/concen/application_controller.rb
concen-0.2.6 app/controllers/concen/application_controller.rb
concen-0.2.5 app/controllers/concen/application_controller.rb
concen-0.2.4 app/controllers/concen/application_controller.rb
concen-0.2.3 app/controllers/concen/application_controller.rb
concen-0.2.2 app/controllers/concen/application_controller.rb
concen-0.2.1 app/controllers/concen/application_controller.rb
concen-0.2.0 app/controllers/concen/application_controller.rb
concen-0.1.7 app/controllers/concen/application_controller.rb
concen-0.1.6 app/controllers/concen/application_controller.rb
concen-0.1.5 app/controllers/concen/application_controller.rb
concen-0.1.4 app/controllers/concen/application_controller.rb
concen-0.1.3 app/controllers/concen/application_controller.rb
concen-0.1.2 app/controllers/concen/application_controller.rb
concen-0.1.1 app/controllers/concen/application_controller.rb
concen-0.1 app/controllers/concen/application_controller.rb