Thiago
Thiago

Reputation: 2258

Where's I18n.localize defined in rails?

I'm looking at rails/actionpack/lib/action_view/helpers/translation_helper.rb at line 59 and I'd like to see the definition of I18n.localize. However, greping for "def localize" gives me only this file and rails/actionpack/lib/abstract_controller/translation.rb, which also redirects to I18n.localize. I also greped for "module I18n" and I've found rails/activesupport/lib/active_support/i18n_railtie.rb, but no definition of I18n.localize. How can I find this definition?

Upvotes: 2

Views: 255

Answers (1)

bassneck
bassneck

Reputation: 4043

In RubyMine IDE you can ctrl-click a method and it will send you to it's declaration. I think others IDE should have this functionality too.

On my system I18n.localize is defined here: D:\dev\Ruby192\lib\ruby\gems\1.9.1\gems\i18n-0.5.0\lib\i18n.rb:232

Upvotes: 3

Related Questions