Sha256: a7b1eb10fc9a839308104c6bf57d66e2e86ced525ec914b0de3f05d514fc4a86

Contents?: true

Size: 758 Bytes

Versions: 9

Compression:

Stored size: 758 Bytes

Contents

module Spree
  module AuthenticationHelpers
    def self.included(receiver)
      if receiver.send(:respond_to?, :helper_method)
        receiver.send(:helper_method, :spree_current_user)

        if SolidusSupport.frontend_available?
          receiver.send(:helper_method, :spree_login_path)
          receiver.send(:helper_method, :spree_signup_path)
          receiver.send(:helper_method, :spree_logout_path)
        end
      end
    end

    def spree_current_user
      current_spree_user
    end

    if SolidusSupport.frontend_available?
      def spree_login_path
        spree.login_path
      end

      def spree_signup_path
        spree.signup_path
      end

      def spree_logout_path
        spree.logout_path
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 2 rubygems

Version Path
solidus_auth_devise-2.2.0 lib/spree/authentication_helpers.rb
solidus_auth_devise_devise_token_auth-2.1.0.5 lib/spree/authentication_helpers.rb
solidus_auth_devise_devise_token_auth-2.1.0.4 lib/spree/authentication_helpers.rb
solidus_auth_devise_devise_token_auth-2.1.0.3 lib/spree/authentication_helpers.rb
solidus_auth_devise_devise_token_auth-2.1.0.2 lib/spree/authentication_helpers.rb
solidus_auth_devise_devise_token_auth-2.1.0.1 lib/spree/authentication_helpers.rb
solidus_auth_devise_devise_token_auth-2.1.0 lib/spree/authentication_helpers.rb
solidus_auth_devise-2.1.0 lib/spree/authentication_helpers.rb
solidus_auth_devise-2.0.0 lib/spree/authentication_helpers.rb