Sha256: 01cbd047d06de06dcf3bdedffd6d32928bc41f760bceb1c46eddce014ca005c1

Contents?: true

Size: 369 Bytes

Versions: 4

Compression:

Stored size: 369 Bytes

Contents

module Comable
  module ApplicationHelper
    def current_customer
      @current_customer || load_customer
    end

    private

    def load_customer
      @current_customer = logged_in_customer
      @current_customer ||= Comable::Customer.new(cookies)
    end

    def logged_in_customer
      # Please override this method for logged in customer
    end
  end
end

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
comable_core-0.1.0 app/helpers/comable/application_helper.rb
comable-0.0.3 app/helpers/comable/application_helper.rb
comable-0.0.2 app/helpers/comable/application_helper.rb
comable-0.0.1 app/helpers/comable/application_helper.rb