Files
openfoodnetwork/app/helpers/spree/payment_methods_helper.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

16 lines
369 B
Ruby

# frozen_string_literal: true
module Spree
module PaymentMethodsHelper
def payment_method(payment)
# hack to allow us to retrieve the name of a "deleted" payment method
id = payment.payment_method_id
Spree::PaymentMethod.find_with_destroyed(id)
end
def payment_method_name(payment)
payment_method(payment).name
end
end
end