mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-25 20:46:48 +00:00
Use method call directly instead of `public_send` with fixed argument. The cop is declared unsafe. I think that is because it can also replace `send` but we replace only `public_send` here.
22 lines
443 B
Ruby
22 lines
443 B
Ruby
# frozen_string_literal: true
|
|
|
|
module Spree
|
|
module AuthenticationHelpers
|
|
def self.included(receiver)
|
|
receiver.helper_method :spree_current_user
|
|
receiver.helper_method :spree_login_path
|
|
receiver.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
|