diff options
author | Mehmet Emin İNAÇ <mehmetemininac@gmail.com> | 2015-04-04 21:16:58 +0300 |
---|---|---|
committer | Mehmet Emin İNAÇ <mehmetemininac@gmail.com> | 2015-04-04 21:16:58 +0300 |
commit | 75c32edd9d054de41dd4723cd20e2f9b18fb66b5 (patch) | |
tree | 473397d9c35efa855771a02a0228c48a5b9a7d62 /guides/source | |
parent | a05f3e5f96f7a8aa55483d91becdbe49b81833fd (diff) | |
download | rails-75c32edd9d054de41dd4723cd20e2f9b18fb66b5.tar.gz rails-75c32edd9d054de41dd4723cd20e2f9b18fb66b5.tar.bz2 rails-75c32edd9d054de41dd4723cd20e2f9b18fb66b5.zip |
change REQUEST_URI to PATH_INFO
request.env['REQUEST_URI'] returns full URI of the resource
request.env['PATH_INFO'] returns only path of the resource
Diffstat (limited to 'guides/source')
-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 e8d0a83dd0..27f11ebbee 100644 --- a/guides/source/i18n.md +++ b/guides/source/i18n.md @@ -201,7 +201,7 @@ end If your application includes a locale switching menu, you would then have something like this in it: ```ruby -link_to("Deutsch", "#{APP_CONFIG[:deutsch_website_url]}#{request.env['REQUEST_URI']}") +link_to("Deutsch", "#{APP_CONFIG[:deutsch_website_url]}#{request.env['PATH_INFO']}") ``` assuming you would set `APP_CONFIG[:deutsch_website_url]` to some value like `http://www.application.de`. |