Sha256: c3a8f6df7ebb1867d11d1d9122d6678a3c2473e9f53ba4a68caa221d8918c212

Contents?: true

Size: 689 Bytes

Versions: 5

Compression:

Stored size: 689 Bytes

Contents

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

      if Spree::Auth::Engine.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

    def spree_current_user
      current_spree_user
    end

    if Spree::Auth::Engine.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

5 entries across 5 versions & 1 rubygems

Version Path
solidus_auth_devise-1.6.3 lib/spree/authentication_helpers.rb
solidus_auth_devise-1.6.2 lib/spree/authentication_helpers.rb
solidus_auth_devise-1.6.1 lib/spree/authentication_helpers.rb
solidus_auth_devise-1.6.0 lib/spree/authentication_helpers.rb
solidus_auth_devise-1.5.0 lib/spree/authentication_helpers.rb