This project is archived and is in readonly mode.
weird behavior on error_messages_for
-
Martin Andert
I am experiencing the same problem. Looks as
error_messages_fordoes agsub('_', ' ')on the object name before handing it to i18n. My current workaround:de: active_record: models: back_account: "Bankkonto" back account: "Bankkonto"So both
BankAccount.human_nameanderror_messages_for :bank_accountreturn the same translated model name. -
Martin Andert
- Tag changed from 2.3.5 to 2.3.5, error_messages_for, i18n
-
José Valim
- Assigned user set to José Valim
- Milestone set to 2.3.6
Could you please provide a failing test case?
-
Martin Andert
- Tag changed from 2.3.5, error_messages_for, i18n to 18, 2, error_messages_for
I have attached a failing test case.
-
Martin Andert
And here is the test case and the fix in one patch.
-
Repository
(from [6227ec11f0bd10e0b987e2dc9030e57de6d46d54]) Fix error_messages_for i18n issue if object_name has underscores [#3629 weird behavior on error_messages_for status:resolved]
Signed-off-by: José Valim jose.valim@gmail.com
http://github.com/rails/rails/commit/6227ec11f0bd10e0b987e2dc9030e5... -
Andrea Campi
- Tag changed from 18, 2, error_messages_for to 2, error_messages_for
- Importance changed from to Low
-
Andrea Campi
- Tag changed from 2, error_messages_for to 2-3-stable, error_messages_for
