I watched Railscast 328 this morning and I am having difficulty finding docs for a method.
<%= link_to t('.edit', :default => t("helpers.links.edit")),
edit_boy_scout_path(boy_scout), :class => 'btn btn-mini' %>
I understand the link_to method, but I am confused about the t(‘edit …. ) parameter and it is in this method call twice. An explanation or even pointing me to some docs would be great. Thanks for all the help
The
tfunction is an alias forI18n.translate.The
default:option gives the translation to use if the requested key is missing (the'.edit'of your example).See guide in internationalization (and go to 4.1.2 for the syntax of the
:defaultoption)