diff options
author | Cesar Carruitero <cesar@mozilla.pe> | 2012-11-08 17:16:38 -0500 |
---|---|---|
committer | Cesar Carruitero <cesar@mozilla.pe> | 2012-11-08 17:16:57 -0500 |
commit | 3738ef292ac9000cf2e66e91fed61ed939daf59a (patch) | |
tree | 366ae39945f2c813f905291a8d2ca119105011c1 | |
parent | 5fe385ba931217edea254f3e6d14538f0801105c (diff) | |
download | rails-3738ef292ac9000cf2e66e91fed61ed939daf59a.tar.gz rails-3738ef292ac9000cf2e66e91fed61ed939daf59a.tar.bz2 rails-3738ef292ac9000cf2e66e91fed61ed939daf59a.zip |
correct double quotes for interpolation in routing guide [ci_skip]
-rw-r--r-- | guides/source/routing.md | 4 |
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. |