I'm looking at rails/actionpack/lib/action_view开发者_JS百科/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?
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
精彩评论