From 2bd60c844ce92047e03359f4dde4b19f49de92ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Rodr=C3=ADguez?= Date: Sun, 23 Jul 2017 01:25:26 +0200 Subject: Fix regression from multiple mountpoint support --- actionpack/lib/action_dispatch/routing/mapper.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'actionpack/lib/action_dispatch/routing/mapper.rb') diff --git a/actionpack/lib/action_dispatch/routing/mapper.rb b/actionpack/lib/action_dispatch/routing/mapper.rb index eaa0e12b67..28809d7e67 100644 --- a/actionpack/lib/action_dispatch/routing/mapper.rb +++ b/actionpack/lib/action_dispatch/routing/mapper.rb @@ -658,6 +658,11 @@ module ActionDispatch script_namer = ->(options) do prefix_options = options.slice(*_route.segment_keys) prefix_options[:relative_url_root] = "".freeze + + if options[:_recall] + prefix_options.reverse_merge!(options[:_recall].slice(*_route.segment_keys)) + end + # We must actually delete prefix segment keys to avoid passing them to next url_for. _route.segment_keys.each { |k| options.delete(k) } _routes.url_helpers.send("#{name}_path", prefix_options) -- cgit v1.2.3