In Rails 2.3, I used to be able to specify in the en.yml a
specific message to be used as full_message for a specific
attribute, like so:
en:
activerecord:
errors:
full_messages:
credit_card_number:
authorization_failure: There was a problem authorizing your Credit Card.
This message was invoked, e.g. as follows
errors.add(:credit_card_number, :'authorization_failure')
However, in Rails 3, I get an error message:
Credit card number translation missing:
en.activerecord.errors.models.credit_card_payment.attributes.credit_card_number.authorization_failure
I discovered that in Rails 3, the method generate_full_message
was removed, which used to check for translations for
full_messages.
Despite searching for quite a while I was not able to discover a
discussion about this anywhere, or a new way to customize full
messages. Overriding format (default: "%{attribute} %{message}")
doesn't help here either, because it applies to all messages. I'm
looking for a way to bypass the format altogether for specific
attributes.
Is this an oversight or a feature or did I miss an entirely new
way of doing it?