aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/CHANGELOG.md
diff options
context:
space:
mode:
authorSeb Jacobs <me@sebjacobs.com>2014-07-01 23:56:20 +0100
committerAndrew White <andyw@pixeltrix.co.uk>2014-07-06 08:52:32 +0100
commite972d341209f64d1599e30a36b82eee2aa4cd553 (patch)
treefd2f14ff1b6afb5005739abee0e55d389e515368 /actionpack/CHANGELOG.md
parentb974033790c4cec68750d95b4f9789033f7ac93c (diff)
downloadrails-e972d341209f64d1599e30a36b82eee2aa4cd553.tar.gz
rails-e972d341209f64d1599e30a36b82eee2aa4cd553.tar.bz2
rails-e972d341209f64d1599e30a36b82eee2aa4cd553.zip
Generate shallow paths for all children of shallow resources.
Prior to this commit shallow resources would only generate paths for non-direct children (with a nested depth greater than 1). Take the following routes file. resources :blogs do resources :posts, shallow: true do resources :comments do resources :tags end end end This would generate shallow paths for `tags` nested under `posts`, e.g `/posts/:id/tags/`, however it would not generate shallow paths for `comments` nested under `posts`, e.g `/posts/:id/comments/new`. This commit changes the behaviour of the route mapper so that it generate paths for direct children of shallow resources, for example if you take the previous routes file, this will now generate shallow paths for `comments` nested under `posts`, .e.g `posts/:id/comments/new`. This was the behaviour in Rails `4.0.4` however this was broken in @jcoglan's fix for another routes related issue[1]. This also fixes an issue[2] reported by @smdern. [1] https://github.com/rails/rails/commit/d0e5963 [2] https://github.com/rails/rails/issues/15783
Diffstat (limited to 'actionpack/CHANGELOG.md')
-rw-r--r--actionpack/CHANGELOG.md7
1 files changed, 6 insertions, 1 deletions
diff --git a/actionpack/CHANGELOG.md b/actionpack/CHANGELOG.md
index c8ea4052f6..2b22041b3b 100644
--- a/actionpack/CHANGELOG.md
+++ b/actionpack/CHANGELOG.md
@@ -1,3 +1,9 @@
+* Generate shallow paths for all children of shallow resources.
+
+ Fixes #15783.
+
+ *Seb Jacobs*
+
* JSONP responses are now rendered with the `text/javascript` content type
when rendering through a `respond_to` block.
@@ -177,5 +183,4 @@
*Tony Wooster*
-
Please check [4-1-stable](https://github.com/rails/rails/blob/4-1-stable/actionpack/CHANGELOG.md) for previous changes.