Files
openfoodnetwork/app/helpers/spree/payment_methods_helper.rb
Jean-Baptiste Bellet aea0670268 Add method payment_method to get the payment method from a payment
- Method `payment_method_name` now use `payment_method`
2021-05-19 11:55:38 +02:00

14 lines
338 B
Ruby

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