aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_dispatch/routing/mapper.rb
diff options
context:
space:
mode:
authorDavid Rodríguez <deivid.rodriguez@riseup.net>2017-07-23 01:25:26 +0200
committerDavid Rodríguez <deivid.rodriguez@riseup.net>2017-07-24 14:28:10 +0200
commit2bd60c844ce92047e03359f4dde4b19f49de92ea (patch)
tree424cf85dc71ff003c29be7d6a54776632bf8373f /actionpack/lib/action_dispatch/routing/mapper.rb
parent0449d8b6bc02f4c0a416a7c40550e3b8b988d113 (diff)
downloadrails-2bd60c844ce92047e03359f4dde4b19f49de92ea.tar.gz
rails-2bd60c844ce92047e03359f4dde4b19f49de92ea.tar.bz2
rails-2bd60c844ce92047e03359f4dde4b19f49de92ea.zip
Fix regression from multiple mountpoint support
Diffstat (limited to 'actionpack/lib/action_dispatch/routing/mapper.rb')
-rw-r--r--actionpack/lib/action_dispatch/routing/mapper.rb5
1 files changed, 5 insertions, 0 deletions
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)