Sha256: b4d3c2030e1dd3978621279034e30b366b1237fc48ebd8fab19357e08b0da47a

Contents?: true

Size: 259 Bytes

Versions: 4

Compression:

Stored size: 259 Bytes

Contents

module IdentityClient
  module ApplicationHelper
    def authenticate
      redirect_to '/identity_client/auth/icis' unless current_user
    end

    def current_user
      @current_user ||= User.find(session[:user_id]) if session[:user_id]
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
identity_client-0.1.3 app/helpers/identity_client/application_helper.rb
identity_client-0.1.2 app/helpers/identity_client/application_helper.rb
identity_client-0.1.1 app/helpers/identity_client/application_helper.rb
identity_client-0.1.0 app/helpers/identity_client/application_helper.rb