diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2014-07-28 14:07:53 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2014-07-28 14:07:53 -0700 |
commit | 9f63a78d554690efba3819310710634228089d24 (patch) | |
tree | 57698251cf14d37248c1c289d031fed2d71616cf /actionpack | |
parent | 099fd0efc47225afde9394d5f4225fc8ddcd4ae8 (diff) | |
download | rails-9f63a78d554690efba3819310710634228089d24.tar.gz rails-9f63a78d554690efba3819310710634228089d24.tar.bz2 rails-9f63a78d554690efba3819310710634228089d24.zip |
remove the mounted? method
we know the routes should not be "optimized" when mounting an
application
Diffstat (limited to 'actionpack')
-rw-r--r-- | actionpack/lib/action_dispatch/routing/mapper.rb | 2 | ||||
-rw-r--r-- | actionpack/lib/action_dispatch/routing/route_set.rb | 6 |
2 files changed, 2 insertions, 6 deletions
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) |