From 9f63a78d554690efba3819310710634228089d24 Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Mon, 28 Jul 2014 14:07:53 -0700 Subject: remove the mounted? method we know the routes should not be "optimized" when mounting an application --- actionpack/lib/action_dispatch/routing/mapper.rb | 2 +- actionpack/lib/action_dispatch/routing/route_set.rb | 6 +----- 2 files changed, 2 insertions(+), 6 deletions(-) (limited to 'actionpack/lib/action_dispatch') diff --git a/actionpack/lib/action_dispatch/routing/mapper.rb b/actionpack/lib/action_dispatch/routing/mapper.rb index 32d963ba76..95f5f45abe 100644 --- a/actionpack/lib/action_dispatch/routing/mapper.rb +++ b/actionpack/lib/action_dispatch/routing/mapper.rb @@ -621,7 +621,7 @@ module ActionDispatch _routes = @set app.routes.define_mounted_helper(name) app.routes.extend Module.new { - def mounted?; true; end + def optimize_routes_generation?; false; end define_method :find_script_name do |options| super(options) || begin prefix_options = options.slice(*_route.segment_keys) diff --git a/actionpack/lib/action_dispatch/routing/route_set.rb b/actionpack/lib/action_dispatch/routing/route_set.rb index 80c705608d..947391b725 100644 --- a/actionpack/lib/action_dispatch/routing/route_set.rb +++ b/actionpack/lib/action_dispatch/routing/route_set.rb @@ -641,12 +641,8 @@ module ActionDispatch :trailing_slash, :anchor, :params, :only_path, :script_name, :original_script_name] - def mounted? - false - end - def optimize_routes_generation? - !mounted? && default_url_options.empty? + default_url_options.empty? end def find_script_name(options) -- cgit v1.2.3