The error message does not translate my nested model attributes, because it is defined as the only one, but in error messages it looks like the plural.
I have a "Man" model that has mana: addresses. This Person model accepts nested "Addresses" attributes. I create Addresses only with the Person model.
my locale file looks like
en: activerecord: models: person: one: "Person" other: "People" address: one: 'Address' other: 'Addresses' attributes: person: first_name: 'First name' last_name: 'Last name' middle_name: 'Middel name' address: street: street city: city country: country
and for the error message:
en: errors: &errors format: ! '%{attribute} %{message}' messages: blank: can't be blank
It works with single models, but with nested attributes I have a problem with validation messages.
Because the message is displayed as follows:
@messages= {:first_name=>["can't be blank"], :last_name=>["can't be blank"], :"addresses.street"=>["can't be blank"], :"addresses.city"=>["can't be blank"]}>
the search does not find a translation for address.street, since it is just address.street in the yml file.
How can I force find find.street when it searches for address.street without double all of my entries?
santa source share