rails/rails — Issue #5040: Problem translating namespaced model associations in the YAML
Author: nicholaspufal
Created: 2012-02-14 16:05:29+00:00
State: open

I've read that Rails has changed the way we translate associated models using the YAML. Now there is the need to add a slash, instead of simply nesting. That's ok, and while I've just tested it using a `has_one` association and no namespace, it was working fine. See, this works:

activerecord:
attributes:
person:
additional_info/account_manager: "Manager"

`Person has one AdditionalInfo`

However, when I've tried to translate a namespaced association, the same didn't work.
Also, notice that this is a `has_many`, so I'm not sure if the problem is it or the namespace.

This doesn't work:

activerecord:
attributes:
person:
emails/address: "Mail address"

`Person has many Contact::Email`

This also doesn't work:

activerecord:
attributes:
person:
contact/emails/address: "Mail address"

Tried using the singular, email, and still no luck.

I've were able to translate the form labels by passing the namespace (e.g, `contact/email`), but that's another thing. The problem here is translating the validations on the associated objects.

Shouldn't it be working as that?