aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_dispatch/routing
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2015-08-10 22:51:28 -0300
committerRafael Mendonça França <rafaelmfranca@gmail.com>2015-08-10 22:51:46 -0300
commit30608648efc227c3ae24bd8cfa62deb20e2c9648 (patch)
tree497f1e41d08f3f8f5cdda4c61788ebc4b559a577 /actionpack/lib/action_dispatch/routing
parent8adf25a6323ad20302d7009d482ec01491ec92eb (diff)
downloadrails-30608648efc227c3ae24bd8cfa62deb20e2c9648.tar.gz
rails-30608648efc227c3ae24bd8cfa62deb20e2c9648.tar.bz2
rails-30608648efc227c3ae24bd8cfa62deb20e2c9648.zip
Only use path if the key is not present
There are some cases where :path is nil on option and we should respect that.
Diffstat (limited to 'actionpack/lib/action_dispatch/routing')
-rw-r--r--actionpack/lib/action_dispatch/routing/mapper.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_dispatch/routing/mapper.rb b/actionpack/lib/action_dispatch/routing/mapper.rb
index dc400b77c9..2d281f7e66 100644
--- a/actionpack/lib/action_dispatch/routing/mapper.rb
+++ b/actionpack/lib/action_dispatch/routing/mapper.rb
@@ -881,7 +881,7 @@ module ActionDispatch
shallow_prefix: options.fetch(:as, path)
}
- path_scope(options.delete(:path) || path) do
+ path_scope(options.delete(:path) { path }) do
scope(defaults.merge!(options)) { yield }
end
end