diff options
author | Rafael França <rafaelmfranca@gmail.com> | 2018-02-26 22:02:47 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-26 22:02:47 -0500 |
commit | 19460585d56f78b1a7b61c1ffa9900a331df2780 (patch) | |
tree | 91e6b33c2122e96214c76bc9e04970048d008097 /guides | |
parent | f7157e48ea233eab56844dba4203f5149d910eaa (diff) | |
parent | 1439a5423615f38461b87027db097098a8a5afbc (diff) | |
download | rails-19460585d56f78b1a7b61c1ffa9900a331df2780.tar.gz rails-19460585d56f78b1a7b61c1ffa9900a331df2780.tar.bz2 rails-19460585d56f78b1a7b61c1ffa9900a331df2780.zip |
Merge pull request #32115 from avneetmalhotra/routing_bound_parameters_guide_fix
Correct `to` option's value of the route in the Bound Parameters sect…
Diffstat (limited to 'guides')
-rw-r--r-- | guides/source/routing.md | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/guides/source/routing.md b/guides/source/routing.md index efc0e32b56..1e75cbf362 100644 --- a/guides/source/routing.md +++ b/guides/source/routing.md @@ -549,7 +549,7 @@ In particular, simple routing makes it very easy to map legacy URLs to new Rails When you set up a regular route, you supply a series of symbols that Rails maps to parts of an incoming HTTP request. For example, consider this route: ```ruby -get 'photos(/:id)', to: :display +get 'photos(/:id)', to: 'photos#display' ``` If an incoming request of `/photos/1` is processed by this route (because it hasn't matched any previous route in the file), then the result will be to invoke the `display` action of the `PhotosController`, and to make the final parameter `"1"` available as `params[:id]`. This route will also route the incoming request of `/photos` to `PhotosController#display`, since `:id` is an optional parameter, denoted by parentheses. |