aboutsummaryrefslogtreecommitdiffstats
path: root/railties/environments/shared_for_gem.rb
diff options
context:
space:
mode:
Diffstat (limited to 'railties/environments/shared_for_gem.rb')
-rw-r--r--railties/environments/shared_for_gem.rb7
1 files changed, 7 insertions, 0 deletions
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: