Files
openfoodnetwork/lib/spree/authentication_helpers.rb
Luis Ramos e52937c113 Use rubocop auto correct to add frozen string literal to all files
This is an unsafe auto corection, we will need to trust our build here
2021-06-17 23:07:26 +01:00

22 lines
485 B
Ruby

# frozen_string_literal: true
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_logout_path
end
def spree_current_user
current_spree_user
end
def spree_login_path
main_app.login_path
end
delegate :logout_path, to: :spree, prefix: true
end
end