aboutsummaryrefslogtreecommitdiffstats
path: root/railties/environments
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2005-02-20 13:58:03 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2005-02-20 13:58:03 +0000
commit69d0f50206bcca5d6b7d9c491637509af434651c (patch)
treedbc40013c8b63738675835d6e725128ee5630ce9 /railties/environments
parent12a75736303d67f17e29f25aa635d521a56d0de2 (diff)
downloadrails-69d0f50206bcca5d6b7d9c491637509af434651c.tar.gz
rails-69d0f50206bcca5d6b7d9c491637509af434651c.tar.bz2
rails-69d0f50206bcca5d6b7d9c491637509af434651c.zip
Added support for independent components residing in /components
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@714 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
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: