Module: Spree::AuthenticationHelpers

Defined in:
lib/spree/authentication_helpers.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(receiver) ⇒ Object



4
5
6
7
8
# File 'lib/spree/authentication_helpers.rb', line 4

def self.included(receiver)
  receiver.send :helper_method, :spree_current_user      
  receiver.send :helper_method, :spree_login_path
  receiver.send :helper_method, :spree_logout_path
end

Instance Method Details

#spree_current_userObject



10
11
12
# File 'lib/spree/authentication_helpers.rb', line 10

def spree_current_user
  current_cms_user
end

#spree_login_pathObject



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

def 
  main_app.new_cms_user_session_path
end

#spree_logout_pathObject



18
19
20
# File 'lib/spree/authentication_helpers.rb', line 18

def spree_logout_path
  main_app.destroy_cms_user_session_path
end