diff options
author | Aaron Patterson <tenderlove@github.com> | 2018-09-26 14:21:15 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-26 14:21:15 -0700 |
commit | 7f870a5ba2aa9177aa4a0e03a9d027928ba60e49 (patch) | |
tree | b4fb19def15c5033483ecebe25d4e762ee1a4dab /actionpack/lib/abstract_controller | |
parent | 6556898884d636c59baae008e42783b8d3e16440 (diff) | |
parent | b42d246c5d020a46d5964d236eb7f0d857ef01e8 (diff) | |
download | rails-7f870a5ba2aa9177aa4a0e03a9d027928ba60e49.tar.gz rails-7f870a5ba2aa9177aa4a0e03a9d027928ba60e49.tar.bz2 rails-7f870a5ba2aa9177aa4a0e03a9d027928ba60e49.zip |
Merge pull request #33970 from rails/eager-url-helpers
Eagerly build the routing helper module after routes are committed
Diffstat (limited to 'actionpack/lib/abstract_controller')
-rw-r--r-- | actionpack/lib/abstract_controller/railties/routes_helpers.rb | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/actionpack/lib/abstract_controller/railties/routes_helpers.rb b/actionpack/lib/abstract_controller/railties/routes_helpers.rb index b6e5631a4e..c97be074c8 100644 --- a/actionpack/lib/abstract_controller/railties/routes_helpers.rb +++ b/actionpack/lib/abstract_controller/railties/routes_helpers.rb @@ -7,11 +7,8 @@ module AbstractController Module.new do define_method(:inherited) do |klass| super(klass) - 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 + + routes.include_helpers klass, include_path_helpers end end end |