aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_dispatch/routing
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/lib/action_dispatch/routing')
-rw-r--r--actionpack/lib/action_dispatch/routing/mapper.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/actionpack/lib/action_dispatch/routing/mapper.rb b/actionpack/lib/action_dispatch/routing/mapper.rb
index 2d2073de9a..08560ccf7d 100644
--- a/actionpack/lib/action_dispatch/routing/mapper.rb
+++ b/actionpack/lib/action_dispatch/routing/mapper.rb
@@ -1402,6 +1402,8 @@ module ActionDispatch
# as a comment on a blog post like <tt>/posts/a-long-permalink/comments/1234</tt>
# to be shortened to just <tt>/comments/1234</tt>.
#
+ # Set shallow: false on a child resource to ignore a parent's shallow parameter.
+ #
# [:shallow_path]
# Prefixes nested shallow routes with the specified path.
#
@@ -1672,7 +1674,8 @@ module ActionDispatch
return true
end
- if options.delete(:shallow)
+ if options[:shallow]
+ options.delete(:shallow)
shallow do
send(method, resources.pop, options, &block)
end