aboutsummaryrefslogtreecommitdiffstats
path: root/railties/environments
diff options
context:
space:
mode:
Diffstat (limited to 'railties/environments')
-rw-r--r--railties/environments/shared.rb7
-rw-r--r--railties/environments/shared_for_gem.rb7
2 files changed, 14 insertions, 0 deletions
diff --git a/railties/environments/shared.rb b/railties/environments/shared.rb
index 120ac08b2b..2e4e4ade13 100644
--- a/railties/environments/shared.rb
+++ b/railties/environments/shared.rb
@@ -7,6 +7,7 @@ ADDITIONAL_LOAD_PATHS = ["#{RAILS_ROOT}/test/mocks/#{RAILS_ENV}"]
# Then model subdirectories.
ADDITIONAL_LOAD_PATHS.concat(Dir["#{RAILS_ROOT}/app/models/[_a-z]*"])
+ADDITIONAL_LOAD_PATHS.concat(Dir["#{RAILS_ROOT}/components/[_a-z]*"])
# Followed by the standard includes.
ADDITIONAL_LOAD_PATHS.concat %w(
@@ -16,6 +17,7 @@ ADDITIONAL_LOAD_PATHS.concat %w(
app/helpers
app/apis
config
+ components
lib
vendor
vendor/railties
@@ -61,4 +63,9 @@ end
[ActionController, ActionMailer].each { |mod| mod::Base.template_root ||= "#{RAILS_ROOT}/app/views/" }
ActionController::Routing::Routes.reload
+Controllers = Dependencies::LoadingModule.root(
+ File.expand_path(File.join(RAILS_ROOT, 'app', 'controllers')),
+ File.expand_path(File.join(RAILS_ROOT, 'components'))
+)
+
# Include your app's configuration here:
diff --git a/railties/environments/shared_for_gem.rb b/railties/environments/shared_for_gem.rb
index dc424aa6b3..ee77e3341a 100644
--- a/railties/environments/shared_for_gem.rb
+++ b/railties/environments/shared_for_gem.rb
@@ -7,6 +7,7 @@ ADDITIONAL_LOAD_PATHS = ["#{RAILS_ROOT}/test/mocks/#{RAILS_ENV}"]
# Then model subdirectories.
ADDITIONAL_LOAD_PATHS.concat(Dir["#{RAILS_ROOT}/app/models/[_a-z]*"])
+ADDITIONAL_LOAD_PATHS.concat(Dir["#{RAILS_ROOT}/components/[_a-z]*"])
# Followed by the standard includes.
ADDITIONAL_LOAD_PATHS.concat %w(
@@ -16,6 +17,7 @@ ADDITIONAL_LOAD_PATHS.concat %w(
app/helpers
app/apis
config
+ components
lib
vendor
).map { |dir| "#{RAILS_ROOT}/#{dir}" }
@@ -56,4 +58,9 @@ end
[ActionController, ActionMailer].each { |mod| mod::Base.template_root ||= "#{RAILS_ROOT}/app/views/" }
ActionController::Routing::Routes.reload
+Controllers = Dependencies::LoadingModule.root(
+ File.expand_path(File.join(RAILS_ROOT, 'app', 'controllers')),
+ File.expand_path(File.join(RAILS_ROOT, 'components'))
+)
+
# Include your app's configuration here: