Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

Object names with underscore do the wrong lookup in I18n on error_messages_for

#2390

If I have an object name like "book_seller." On error_messages_for it will search for "book seller" instead of "book_seller".

A quick solution is two maintain both on I18n files:

activerecord:

models:
  book_seller "Book seller"
  book seller: "Book seller"

This patch fix that (tests added).

Reported by José Valim · April 1st, 2009 @ 10:30 AM

State: committed
Milestone: 2.x
Assigned to: nobody
Importance: none

Activity

  1. Yves-Eric Martin
    Yves-Eric Martin

    Obvious bug, simple fix, +1 from me.

    April 1st, 2009 @ 12:09 PM

  2. Andrea
    Andrea

    Yes, i had the same problem too, this should be fixed. +1

    April 1st, 2009 @ 01:37 PM

  3. Ricardo Otero
    Ricardo Otero

    Yes, I need this to be fixed! +1

    April 1st, 2009 @ 02:01 PM

  4. José Valim
    José Valim
    • Tag changed from actionview, bug, error_messages_for, i18n to actionview, bug, error_messages_for, i18n, verified

    April 2nd, 2009 @ 10:33 PM

  5. Repository
    Repository
    • State changed from new to committed

    (from [1ab7c37671d7c0cd9d8698bd462916a7e6f95470]) Object names with underscore do the wrong lookup in I18n on error_messages_for.

    Signed-off-by: Michael Koziarski michael@koziarski.com [#2390 Object names with underscore do the wrong lookup in I18n on error_messages_for state:committed] http://github.com/rails/rails/co...

    April 5th, 2009 @ 10:45 AM