mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-04-06 07:29:16 +00:00
So we don't need to convert strings into classes to then only convert it into the same string again.
15 lines
296 B
Ruby
15 lines
296 B
Ruby
# frozen_string_literal: true
|
|
|
|
module Spree
|
|
module Admin
|
|
module PaymentMethodsHelper
|
|
def payment_method_type_name(class_name)
|
|
scope = "spree.admin.payment_methods.providers"
|
|
key = class_name.demodulize.downcase
|
|
|
|
I18n.t(key, scope:)
|
|
end
|
|
end
|
|
end
|
|
end
|