尝试覆盖以下错误消息:
@order.errors.full_messages
=> ["Payments source is invalid"]
或
> @order.errors.messages
=> {:"payments.source"=>["is invalid"], :store_credit_amount=>[], :gift_code=>[]}
目前显示 Payments source is invalid
,我想展示类似的内容:
Please check your credit card info.
知道如何以干净的方式实现这一目标吗?
谢谢,