Discover what i18n keys are looked up

I'm using Formtastic to display a form, but it is not looking up the label value I expect.

It's defined in the yaml file as:

en:
  activerecord:
    attributes:
      my_model:
        foo:

and it used to work in rails 2.3 but is now failing after upgrading the app to rails 3.2 and newer formtastic. I can only guess that it is looking for something else.

Is there a way to log every call to translate to see what is being looked up?

Answers


Solved. Formtastic was configured with:

 Formtastic::FormBuilder.label_str_method = :titleize

which bypassed the humanize method that actually looks up I18n data.


Need Your Help

Search three columns

mysql sql search

I hope someone can help with the following. I'm trying to create a user-specific search feature. When someone is logged in, they can run a search which should return results from either the custome...

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.