aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails/engine
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2018-09-26 11:09:35 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2018-09-26 11:09:35 -0700
commit6060a1d97bc02a47d9f41d9dc3208a33c2a1a696 (patch)
tree6ea3d1b0987581733de86a5ec9e8030c9b969942 /railties/lib/rails/engine
parent338c3c45fa4018e695453ccd3d73c4c9362fc007 (diff)
downloadrails-6060a1d97bc02a47d9f41d9dc3208a33c2a1a696.tar.gz
rails-6060a1d97bc02a47d9f41d9dc3208a33c2a1a696.tar.bz2
rails-6060a1d97bc02a47d9f41d9dc3208a33c2a1a696.zip
Eager load supports individual files
Also we want to eager load routes before anything else.
Diffstat (limited to 'railties/lib/rails/engine')
-rw-r--r--railties/lib/rails/engine/configuration.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/railties/lib/rails/engine/configuration.rb b/railties/lib/rails/engine/configuration.rb
index 6bf0406b21..7595272c03 100644
--- a/railties/lib/rails/engine/configuration.rb
+++ b/railties/lib/rails/engine/configuration.rb
@@ -38,6 +38,7 @@ 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
@@ -55,7 +56,6 @@ 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"