Permalink
Browse files

remove the mounted? method

we know the routes should not be "optimized" when mounting an
application
  • Loading branch information...
1 parent 099fd0e commit 9f63a78d554690efba3819310710634228089d24 @tenderlove tenderlove committed Jul 28, 2014
@@ -621,7 +621,7 @@ def define_generate_prefix(app, name)
_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)
@@ -641,12 +641,8 @@ def generate(route_key, options, recall = {})
: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)

0 comments on commit 9f63a78

Please sign in to comment.