Files
openfoodnetwork/lib/spree/authentication_helpers.rb
luisramos0 10e123a9c4 Move spree/authentication_helpers injection from spree initializers directly to the application_controller
Also, switch from using send to public_send making rubocop happier
2019-07-08 13:11:57 +01:00

27 lines
578 B
Ruby

module Spree
module AuthenticationHelpers
def self.included(receiver)
receiver.public_send :helper_method, :spree_current_user
receiver.public_send :helper_method, :spree_login_path
receiver.public_send :helper_method, :spree_signup_path
receiver.public_send :helper_method, :spree_logout_path
end
def spree_current_user
current_spree_user
end
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