diff options
author | schneems <richard.schneeman+foo@gmail.com> | 2018-10-03 16:15:47 -0500 |
---|---|---|
committer | schneems <richard.schneeman+foo@gmail.com> | 2018-10-03 16:15:47 -0500 |
commit | 235e734e1ea1e8bc1f8dcf2f6a75126a48fccd7a (patch) | |
tree | e2fe7a8f9f6c877b3cfbdf3452d8cb943260d5ad /actionpack/lib/abstract_controller | |
parent | ebf98df9fb705738ece08e3182d41e6f604be491 (diff) | |
download | rails-235e734e1ea1e8bc1f8dcf2f6a75126a48fccd7a.tar.gz rails-235e734e1ea1e8bc1f8dcf2f6a75126a48fccd7a.tar.bz2 rails-235e734e1ea1e8bc1f8dcf2f6a75126a48fccd7a.zip |
Revert "Merge pull request #33970 from rails/eager-url-helpers"
Until #34050 can be resolved
This reverts commit 7f870a5ba2aa9177aa4a0e03a9d027928ba60e49, reversing
changes made to 6556898884d636c59baae008e42783b8d3e16440.
Diffstat (limited to 'actionpack/lib/abstract_controller')
-rw-r--r-- | actionpack/lib/abstract_controller/railties/routes_helpers.rb | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/actionpack/lib/abstract_controller/railties/routes_helpers.rb b/actionpack/lib/abstract_controller/railties/routes_helpers.rb index c97be074c8..b6e5631a4e 100644 --- a/actionpack/lib/abstract_controller/railties/routes_helpers.rb +++ b/actionpack/lib/abstract_controller/railties/routes_helpers.rb @@ -7,8 +7,11 @@ module AbstractController Module.new do define_method(:inherited) do |klass| super(klass) - - routes.include_helpers klass, include_path_helpers + if namespace = klass.parents.detect { |m| m.respond_to?(:railtie_routes_url_helpers) } + klass.include(namespace.railtie_routes_url_helpers(include_path_helpers)) + else + klass.include(routes.url_helpers(include_path_helpers)) + end end end end |