Sha256: 08621ad787727c652d96dff95408227ec6e7c32c3d014ae462019e234ebee534

Contents?: true

Size: 921 Bytes

Versions: 37

Compression:

Stored size: 921 Bytes

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
      # TODO: Replace this with your implementation for retrieving the current user
      Spree.user_class.new
    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

Version data entries

37 entries across 37 versions & 1 rubygems

Version Path
solidus_core-4.1.6 lib/generators/spree/custom_user/templates/authentication_helpers.rb.tt
solidus_core-4.4.2 lib/generators/spree/custom_user/templates/authentication_helpers.rb.tt
solidus_core-4.4.1 lib/generators/spree/custom_user/templates/authentication_helpers.rb.tt
solidus_core-4.4.0 lib/generators/spree/custom_user/templates/authentication_helpers.rb.tt
solidus_core-4.3.4 lib/generators/spree/custom_user/templates/authentication_helpers.rb.tt
solidus_core-4.2.4 lib/generators/spree/custom_user/templates/authentication_helpers.rb.tt
solidus_core-4.1.5 lib/generators/spree/custom_user/templates/authentication_helpers.rb.tt
solidus_core-4.3.3 lib/generators/spree/custom_user/templates/authentication_helpers.rb.tt
solidus_core-4.3.2 lib/generators/spree/custom_user/templates/authentication_helpers.rb.tt
solidus_core-4.1.4 lib/generators/spree/custom_user/templates/authentication_helpers.rb.tt
solidus_core-4.3.1 lib/generators/spree/custom_user/templates/authentication_helpers.rb.tt
solidus_core-4.3.0 lib/generators/spree/custom_user/templates/authentication_helpers.rb.tt
solidus_core-4.2.3 lib/generators/spree/custom_user/templates/authentication_helpers.rb.tt
solidus_core-4.1.3 lib/generators/spree/custom_user/templates/authentication_helpers.rb.tt
solidus_core-4.0.4 lib/generators/spree/custom_user/templates/authentication_helpers.rb.tt
solidus_core-3.4.6 lib/generators/spree/custom_user/templates/authentication_helpers.rb.tt
solidus_core-4.0.3 lib/generators/spree/custom_user/templates/authentication_helpers.rb.tt
solidus_core-4.1.2 lib/generators/spree/custom_user/templates/authentication_helpers.rb.tt
solidus_core-4.2.2 lib/generators/spree/custom_user/templates/authentication_helpers.rb.tt
solidus_core-3.4.5 lib/generators/spree/custom_user/templates/authentication_helpers.rb.tt