diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2015-06-23 12:55:30 -0300 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2015-06-23 12:55:30 -0300 |
commit | 1022796ac075a5f1a3ca45f4d48284d4bfa2567a (patch) | |
tree | fd8dfb346de24b6ee045ecbb3a2763b34ed055b4 /guides | |
parent | e09129c94c382650987d1005f3e2741b60bfa0d6 (diff) | |
parent | 7a74d81916851d0e5bda5312ffd9936b1b119765 (diff) | |
download | rails-1022796ac075a5f1a3ca45f4d48284d4bfa2567a.tar.gz rails-1022796ac075a5f1a3ca45f4d48284d4bfa2567a.tar.bz2 rails-1022796ac075a5f1a3ca45f4d48284d4bfa2567a.zip |
Merge pull request #20674 from yui-knk/fix/guide2
[ci skip] Make clear what `this method` is
Diffstat (limited to 'guides')
-rw-r--r-- | guides/source/i18n.md | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/guides/source/i18n.md b/guides/source/i18n.md index 31682464ee..272a0e3623 100644 --- a/guides/source/i18n.md +++ b/guides/source/i18n.md @@ -210,7 +210,7 @@ This approach has almost the same set of advantages as setting the locale from t Getting the locale from `params` and setting it accordingly is not hard; including it in every URL and thus **passing it through the requests** is. To include an explicit option in every URL, e.g. `link_to(books_url(locale: I18n.locale))`, would be tedious and probably impossible, of course. -Rails contains infrastructure for "centralizing dynamic decisions about the URLs" in its [`ApplicationController#default_url_options`](http://api.rubyonrails.org/classes/ActionDispatch/Routing/Mapper/Base.html#method-i-default_url_options), which is useful precisely in this scenario: it enables us to set "defaults" for [`url_for`](http://api.rubyonrails.org/classes/ActionDispatch/Routing/UrlFor.html#method-i-url_for) and helper methods dependent on it (by implementing/overriding this method). +Rails contains infrastructure for "centralizing dynamic decisions about the URLs" in its [`ApplicationController#default_url_options`](http://api.rubyonrails.org/classes/ActionDispatch/Routing/Mapper/Base.html#method-i-default_url_options), which is useful precisely in this scenario: it enables us to set "defaults" for [`url_for`](http://api.rubyonrails.org/classes/ActionDispatch/Routing/UrlFor.html#method-i-url_for) and helper methods dependent on it (by implementing/overriding `default_url_options`). We can include something like this in our `ApplicationController` then: |