Module: Spree::AuthenticationHelpers

Defined in:
lib/spree/authentication_helpers.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(receiver) ⇒ Object



3
4
5
6
7
8
9
10
11
12
13
# File 'lib/spree/authentication_helpers.rb', line 3

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

Instance Method Details

#spree_current_userObject



15
16
17
# File 'lib/spree/authentication_helpers.rb', line 15

def spree_current_user
  current_spree_user
end

#spree_login_pathObject



20
21
22
# File 'lib/spree/authentication_helpers.rb', line 20

def 
  spree.
end

#spree_logout_pathObject



28
29
30
# File 'lib/spree/authentication_helpers.rb', line 28

def spree_logout_path
  spree.logout_path
end

#spree_signup_pathObject



24
25
26
# File 'lib/spree/authentication_helpers.rb', line 24

def 
  spree.
end