aboutsummaryrefslogtreecommitdiffstats
path: root/guides/source/routing.md
diff options
context:
space:
mode:
authorclaudiob <claudiob@inventati.org>2017-04-07 09:18:19 -0700
committerclaudiob <claudiob@inventati.org>2017-04-07 09:23:18 -0700
commit0b4ff7eacfeb36fca86c597da7c3ace059f8517a (patch)
tree02854cd124aff1416400c868462f06e3b543564b /guides/source/routing.md
parente88e35804a017b10d93e7e9c6b5708a2273047df (diff)
downloadrails-0b4ff7eacfeb36fca86c597da7c3ace059f8517a.tar.gz
rails-0b4ff7eacfeb36fca86c597da7c3ace059f8517a.tar.bz2
rails-0b4ff7eacfeb36fca86c597da7c3ace059f8517a.zip
Fix Guides to include #23138 [ci skip]
A long-standing bug has been fixed in Rails 5.1 by @pixeltrix See https://github.com/rails/rails/blame/5-1-stable/actionpack/CHANGELOG.md#L52-L64 This PR updates the guides accordingly. Before: <img width="799" alt="before" src="https://cloud.githubusercontent.com/assets/10076/24809105/4ec7066c-1b73-11e7-98c6-c709c3465306.png"> After: <img width="799" alt="after" src="https://cloud.githubusercontent.com/assets/10076/24809109/50b21188-1b73-11e7-8a1a-32c3d0ed512a.png">
Diffstat (limited to 'guides/source/routing.md')
-rw-r--r--guides/source/routing.md9
1 files changed, 1 insertions, 8 deletions
diff --git a/guides/source/routing.md b/guides/source/routing.md
index 53735ce82e..545f53a8e0 100644
--- a/guides/source/routing.md
+++ b/guides/source/routing.md
@@ -152,6 +152,7 @@ This resourceful route:
```ruby
resource :geocoder
+resolve('Geocoder') { [:geocoder] }
```
creates six different routes in your application, all mapping to the `Geocoders` controller:
@@ -175,14 +176,6 @@ A singular resourceful route generates these helpers:
As with plural resources, the same helpers ending in `_url` will also include the host, port and path prefix.
-WARNING: A [long-standing bug](https://github.com/rails/rails/issues/1769) prevents `form_for` from working automatically with singular resources. As a workaround, specify the URL for the form directly, like so:
-
-```ruby
-form_for @geocoder, url: geocoder_path do |f|
-
-# snippet for brevity
-```
-
### Controller Namespaces and Routing
You may wish to organize groups of controllers under a namespace. Most commonly, you might group a number of administrative controllers under an `Admin::` namespace. You would place these controllers under the `app/controllers/admin` directory, and you can group them together in your router: