Sha256: 3a2c091a16cacfd87577e95a02aa945461245cf24f4d903aeaaa3cc4b6ce6d06

Contents?: true

Size: 1 KB

Versions: 123

Compression:

Stored size: 1 KB

Contents

# This file was originally generated by the spree:custom_user generator
# in solidus <%= Spree.solidus_version %>. You can customize the helper method
# implementations for your custom auth solution.

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.send :include, Spree::AuthenticationHelpers
ApplicationController.send :include, Spree::CurrentUserHelpers

Spree::Api::BaseController.send :include, Spree::CurrentUserHelpers

Version data entries

123 entries across 123 versions & 2 rubygems

Version Path
solidus_core-3.2.9 lib/generators/spree/custom_user/templates/authentication_helpers.rb.tt
solidus_core-3.2.8 lib/generators/spree/custom_user/templates/authentication_helpers.rb.tt
solidus_core-3.2.7 lib/generators/spree/custom_user/templates/authentication_helpers.rb.tt
solidus_core-3.2.6 lib/generators/spree/custom_user/templates/authentication_helpers.rb.tt
solidus_core-3.1.9 lib/generators/spree/custom_user/templates/authentication_helpers.rb.tt
solidus_core-3.2.5 lib/generators/spree/custom_user/templates/authentication_helpers.rb.tt
solidus_core-3.2.4 lib/generators/spree/custom_user/templates/authentication_helpers.rb.tt
solidus_core-3.2.3 lib/generators/spree/custom_user/templates/authentication_helpers.rb.tt
solidus_core-3.1.8 lib/generators/spree/custom_user/templates/authentication_helpers.rb.tt
solidus_core-3.0.8 lib/generators/spree/custom_user/templates/authentication_helpers.rb.tt
solidus_core-3.2.2 lib/generators/spree/custom_user/templates/authentication_helpers.rb.tt
solidus_core-3.2.1 lib/generators/spree/custom_user/templates/authentication_helpers.rb.tt
solidus_core-3.2.0 lib/generators/spree/custom_user/templates/authentication_helpers.rb.tt
solidus_core-3.2.0.alpha lib/generators/spree/custom_user/templates/authentication_helpers.rb.tt
solidus_core-3.0.7 lib/generators/spree/custom_user/templates/authentication_helpers.rb.tt
solidus_core-2.11.17 lib/generators/spree/custom_user/templates/authentication_helpers.rb.tt
solidus_core-3.1.7 lib/generators/spree/custom_user/templates/authentication_helpers.rb.tt
solidus_core-2.11.16 lib/generators/spree/custom_user/templates/authentication_helpers.rb.tt
solidus_core-3.0.6 lib/generators/spree/custom_user/templates/authentication_helpers.rb.tt
solidus_core-3.1.6 lib/generators/spree/custom_user/templates/authentication_helpers.rb.tt