Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Override model_name.human for PaymentMethod
Recently we started using model_name.human instead of the raw class name when displaying the names of payment methods. Unfortunately, if there isn't an i18n key for that specific payment method, model_name.human will fall back to "Payment Method", which is not at all helpful in distinguishing it. This commit changes PaymentMethod.model_name to return a custom ActiveModel::Name subclass, which will use exact matches for translations but doesn't fall back to "Payment Method", and instead will use the "humanized" class name if there is no key.
- Loading branch information