Module: Spree::AuthenticationHelpers
- Defined in:
- lib/spree/authentication_helpers.rb
Class Method Summary collapse
Instance Method Summary collapse
- #spree_current_user ⇒ Object
- #spree_login_path ⇒ Object
- #spree_logout_path ⇒ Object
- #spree_signup_path ⇒ Object
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_user ⇒ Object
15 16 17 |
# File 'lib/spree/authentication_helpers.rb', line 15 def spree_current_user current_spree_user end |
#spree_login_path ⇒ Object
20 21 22 |
# File 'lib/spree/authentication_helpers.rb', line 20 def spree_login_path spree.login_path end |
#spree_logout_path ⇒ Object
28 29 30 |
# File 'lib/spree/authentication_helpers.rb', line 28 def spree_logout_path spree.logout_path end |
#spree_signup_path ⇒ Object
24 25 26 |
# File 'lib/spree/authentication_helpers.rb', line 24 def spree_signup_path spree.signup_path end |