遇到关联时,我有一个关于 i18n in rails 的问题
class User
belongs_to :billing_address, :class_name => "Address'
belongs_to :delivery_address, :class_name => "Address'
end
en:
activerecord:
attributes:
user:
billing_address_id: "billing address"
delivery_address_id: "delivery address"
上面的代码有效,但我想知道是否有另一种方法可以通过不在_id
yml 中使用后缀来实现这一点?