diff options
Diffstat (limited to 'railties/lib/rails')
-rw-r--r-- | railties/lib/rails/engine.rb | 16 | ||||
-rw-r--r-- | railties/lib/rails/engine/configuration.rb | 2 |
2 files changed, 4 insertions, 14 deletions
diff --git a/railties/lib/rails/engine.rb b/railties/lib/rails/engine.rb index 901934826b..6a13a84108 100644 --- a/railties/lib/rails/engine.rb +++ b/railties/lib/rails/engine.rb @@ -403,12 +403,6 @@ module Rails define_method(:railtie_helpers_paths) { railtie.helpers_paths } end - unless mod.respond_to?(:railtie_include_helpers) - define_method(:railtie_include_helpers) { |klass, include_path_helpers| - railtie.routes.include_helpers(klass, include_path_helpers) - } - end - unless mod.respond_to?(:railtie_routes_url_helpers) define_method(:railtie_routes_url_helpers) { |include_path_helpers = true| railtie.routes.url_helpers(include_path_helpers) } end @@ -479,13 +473,9 @@ module Rails # files inside eager_load paths. def eager_load! config.eager_load_paths.each do |load_path| - if File.file?(load_path) - require_dependency load_path - else - matcher = /\A#{Regexp.escape(load_path.to_s)}\/(.*)\.rb\Z/ - Dir.glob("#{load_path}/**/*.rb").sort.each do |file| - require_dependency file.sub(matcher, '\1') - end + matcher = /\A#{Regexp.escape(load_path.to_s)}\/(.*)\.rb\Z/ + Dir.glob("#{load_path}/**/*.rb").sort.each do |file| + require_dependency file.sub(matcher, '\1') end end end diff --git a/railties/lib/rails/engine/configuration.rb b/railties/lib/rails/engine/configuration.rb index 7595272c03..6bf0406b21 100644 --- a/railties/lib/rails/engine/configuration.rb +++ b/railties/lib/rails/engine/configuration.rb @@ -38,7 +38,6 @@ module Rails @paths ||= begin paths = Rails::Paths::Root.new(@root) - paths.add "config/routes.rb", eager_load: true paths.add "app", eager_load: true, glob: "{*,*/concerns}" paths.add "app/assets", glob: "*" paths.add "app/controllers", eager_load: true @@ -56,6 +55,7 @@ module Rails paths.add "config/environments", glob: "#{Rails.env}.rb" paths.add "config/initializers", glob: "**/*.rb" paths.add "config/locales", glob: "*.{rb,yml}" + paths.add "config/routes.rb" paths.add "db" paths.add "db/migrate" |