Permalink
Browse files

Added support for independent components residing in /components

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@714 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
1 parent 12a7573 commit 69d0f50206bcca5d6b7d9c491637509af434651c @dhh dhh committed Feb 20, 2005
View
@@ -1,5 +1,16 @@
*SVN*
+* Added support for independent components residing in /components. Example:
+
+ Controller: components/list/items_controller.rb
+ (holds a List::ItemsController class with uses_component_template_root called)
+
+ Model : components/list/item.rb
+ (namespace is still shared, so an Item model in app/models will take precedence)
+
+ Views : components/list/items/show.rhtml
+
+
* Added --sandbox option to script/console that'll roll back all changes made to the database when you quit #672 [bitsweat]
* Added 'recent' as a rake target that'll run tests for files that changed in the last 10 minutes #612 [bitsweat]
View
@@ -14,7 +14,7 @@ PKG_FILE_NAME = "#{PKG_NAME}-#{PKG_VERSION}"
PKG_DESTINATION = ENV["RAILS_PKG_DESTINATION"] || "../#{PKG_NAME}"
-BASE_DIRS = %w( app config/environments db doc log lib public script test vendor )
+BASE_DIRS = %w( app config/environments components db doc log lib public script test vendor )
APP_DIRS = %w( apis models controllers helpers views views/layouts )
PUBLIC_DIRS = %w( images javascripts stylesheets _doc )
TEST_DIRS = %w( fixtures unit functional mocks mocks/development mocks/testing )
@@ -7,6 +7,7 @@
# 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 @@
app/helpers
app/apis
config
+ components
lib
vendor
vendor/railties
@@ -61,4 +63,9 @@
[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:
@@ -7,6 +7,7 @@
# 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 @@
app/helpers
app/apis
config
+ components
lib
vendor
).map { |dir| "#{RAILS_ROOT}/#{dir}" }
@@ -56,4 +58,9 @@
[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:
@@ -102,6 +102,7 @@ def add_options!(opt)
app/models
app/views/layouts
config/environments
+ components
db
doc
lib

0 comments on commit 69d0f50

Please sign in to comment.