Sha256: cbc3e48c3eaa41d1d0c62b5907e313d696d82001808fc8ab22a75440178c6c9a

Contents?: true

Size: 806 Bytes

Versions: 142

Compression:

Stored size: 806 Bytes

Contents

module Spree
  module CurrentUserHelpers
    def self.included(receiver)
      receiver.send :helper_method, :spree_current_user
    end

    def spree_current_user
      current_user
    end
  end

  module AuthenticationHelpers
    def self.included(receiver)
      receiver.send :helper_method, :spree_login_path
      receiver.send :helper_method, :spree_signup_path
      receiver.send :helper_method, :spree_logout_path
    end

    def spree_login_path
      main_app.login_path
    end

    def spree_signup_path
      main_app.signup_path
    end

    def spree_logout_path
      main_app.logout_path
    end
  end
end

ApplicationController.include Spree::AuthenticationHelpers
ApplicationController.include Spree::CurrentUserHelpers

Spree::Api::BaseController.include Spree::CurrentUserHelpers

Version data entries

142 entries across 142 versions & 2 rubygems

Version Path
goca-spree-core-3.1.14.rails.5.0.1 lib/generators/spree/custom_user/templates/authentication_helpers.rb.tt
spree_core-4.7.3 lib/generators/spree/custom_user/templates/authentication_helpers.rb.tt
spree_core-4.6.6 lib/generators/spree/custom_user/templates/authentication_helpers.rb.tt
spree_core-4.5.5 lib/generators/spree/custom_user/templates/authentication_helpers.rb.tt
spree_core-4.0.9 lib/generators/spree/custom_user/templates/authentication_helpers.rb.tt
spree_core-4.1.15 lib/generators/spree/custom_user/templates/authentication_helpers.rb.tt
spree_core-4.2.7 lib/generators/spree/custom_user/templates/authentication_helpers.rb.tt
spree_core-4.3.3 lib/generators/spree/custom_user/templates/authentication_helpers.rb.tt
spree_core-4.4.1 lib/generators/spree/custom_user/templates/authentication_helpers.rb.tt
spree_core-4.5.4 lib/generators/spree/custom_user/templates/authentication_helpers.rb.tt
spree_core-4.6.5 lib/generators/spree/custom_user/templates/authentication_helpers.rb.tt
spree_core-4.7.2 lib/generators/spree/custom_user/templates/authentication_helpers.rb.tt
spree_core-4.7.1 lib/generators/spree/custom_user/templates/authentication_helpers.rb.tt
spree_core-4.6.4 lib/generators/spree/custom_user/templates/authentication_helpers.rb.tt
spree_core-4.7.0 lib/generators/spree/custom_user/templates/authentication_helpers.rb.tt
spree_core-4.6.3 lib/generators/spree/custom_user/templates/authentication_helpers.rb.tt
spree_core-4.6.2 lib/generators/spree/custom_user/templates/authentication_helpers.rb.tt
spree_core-4.6.1 lib/generators/spree/custom_user/templates/authentication_helpers.rb.tt
spree_core-4.6.0 lib/generators/spree/custom_user/templates/authentication_helpers.rb.tt
spree_core-4.5.3 lib/generators/spree/custom_user/templates/authentication_helpers.rb.tt