Sha256: d6751c1b2eadab40dde5be0d470f225c1940826226193b42bd8d8eaf64e37ef6

Contents?: true

Size: 710 Bytes

Versions: 11

Compression:

Stored size: 710 Bytes

Contents

# frozen_string_literal: true

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?
      delegate :login_path, :signup_path, :logout_path,
               to: :spree,
               prefix: :spree
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
solidus_auth_devise-2.5.9 lib/spree/authentication_helpers.rb
solidus_auth_devise-2.5.8 lib/spree/authentication_helpers.rb
solidus_auth_devise-2.5.7 lib/spree/authentication_helpers.rb
solidus_auth_devise-2.5.6 lib/spree/authentication_helpers.rb
solidus_auth_devise-2.5.4 lib/spree/authentication_helpers.rb
solidus_auth_devise-2.5.3 lib/spree/authentication_helpers.rb
solidus_auth_devise-2.5.2 lib/spree/authentication_helpers.rb
solidus_auth_devise-2.5.1 lib/spree/authentication_helpers.rb
solidus_auth_devise-2.5.0 lib/spree/authentication_helpers.rb
solidus_auth_devise-2.4.0 lib/spree/authentication_helpers.rb
solidus_auth_devise-2.3.0 lib/spree/authentication_helpers.rb