aboutsummaryrefslogtreecommitdiffstats
path: root/guides/source
diff options
context:
space:
mode:
authorCesar Carruitero <cesar@mozilla.pe>2012-11-08 17:16:38 -0500
committerCesar Carruitero <cesar@mozilla.pe>2012-11-08 17:16:57 -0500
commit3738ef292ac9000cf2e66e91fed61ed939daf59a (patch)
tree366ae39945f2c813f905291a8d2ca119105011c1 /guides/source
parent5fe385ba931217edea254f3e6d14538f0801105c (diff)
downloadrails-3738ef292ac9000cf2e66e91fed61ed939daf59a.tar.gz
rails-3738ef292ac9000cf2e66e91fed61ed939daf59a.tar.bz2
rails-3738ef292ac9000cf2e66e91fed61ed939daf59a.zip
correct double quotes for interpolation in routing guide [ci_skip]
Diffstat (limited to 'guides/source')
-rw-r--r--guides/source/routing.md4
1 files changed, 2 insertions, 2 deletions
diff --git a/guides/source/routing.md b/guides/source/routing.md
index dce45b95b8..53f037c25b 100644
--- a/guides/source/routing.md
+++ b/guides/source/routing.md
@@ -668,8 +668,8 @@ get '/stories/:name', to: redirect('/posts/%{name}')
You can also provide a block to redirect, which receives the params and the request object:
```ruby
-get '/stories/:name', to: redirect {|params, req| '/posts/#{params[:name].pluralize}' }
-get '/stories', to: redirect {|p, req| '/posts/#{req.subdomain}' }
+get '/stories/:name', to: redirect {|params, req| "/posts/#{params[:name].pluralize}" }
+get '/stories', to: redirect {|p, req| "/posts/#{req.subdomain}" }
```
Please note that this redirection is a 301 "Moved Permanently" redirect. Keep in mind that some web browsers or proxy servers will cache this type of redirect, making the old page inaccessible.