From 30608648efc227c3ae24bd8cfa62deb20e2c9648 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafael=20Mendon=C3=A7a=20Fran=C3=A7a?= Date: Mon, 10 Aug 2015 22:51:28 -0300 Subject: Only use path if the key is not present There are some cases where :path is nil on option and we should respect that. --- actionpack/lib/action_dispatch/routing/mapper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'actionpack/lib/action_dispatch/routing') 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 -- cgit v1.2.3