aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_dispatch/routing/mapper.rb
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2014-05-13 15:35:41 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2014-05-13 15:35:41 -0700
commit33d6e3be623d4dbcec077e62699272cbdcd23f37 (patch)
treefe5a90ad364f0b8968a129ff42ee4eccc465eb01 /actionpack/lib/action_dispatch/routing/mapper.rb
parent67f815af058cf0a4dbf1dcea50eec2585cd7ee3a (diff)
downloadrails-33d6e3be623d4dbcec077e62699272cbdcd23f37.tar.gz
rails-33d6e3be623d4dbcec077e62699272cbdcd23f37.tar.bz2
rails-33d6e3be623d4dbcec077e62699272cbdcd23f37.zip
drop || test for cases that do not need it
Diffstat (limited to 'actionpack/lib/action_dispatch/routing/mapper.rb')
-rw-r--r--actionpack/lib/action_dispatch/routing/mapper.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/actionpack/lib/action_dispatch/routing/mapper.rb b/actionpack/lib/action_dispatch/routing/mapper.rb
index d75ea9394c..58c7f5330e 100644
--- a/actionpack/lib/action_dispatch/routing/mapper.rb
+++ b/actionpack/lib/action_dispatch/routing/mapper.rb
@@ -580,11 +580,13 @@ module ActionDispatch
app.routes.define_mounted_helper(name)
app.routes.extend Module.new {
def mounted?; true; end
- define_method :_generate_prefix do |options|
+ define_method :find_script_name do |options|
+ super(options) || begin
prefix_options = options.slice(*_route.segment_keys)
# 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)
+ end
end
}
end