aboutsummaryrefslogtreecommitdiffstats
path: root/railties/environments
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2005-02-18 10:58:25 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2005-02-18 10:58:25 +0000
commitbc8e41247b2bdc37da8be4e963caf99451418cd2 (patch)
treeadf19267c602b0b14ae5596d93a81b1cae353437 /railties/environments
parent45acc8c760baf8a677cb947aa5814f4d30b13b41 (diff)
downloadrails-bc8e41247b2bdc37da8be4e963caf99451418cd2.tar.gz
rails-bc8e41247b2bdc37da8be4e963caf99451418cd2.tar.bz2
rails-bc8e41247b2bdc37da8be4e963caf99451418cd2.zip
Integrated Action Service with the existing elements
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@660 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'railties/environments')
-rw-r--r--railties/environments/shared.rb11
-rw-r--r--railties/environments/shared_for_gem.rb10
2 files changed, 9 insertions, 12 deletions
diff --git a/railties/environments/shared.rb b/railties/environments/shared.rb
index 9b261ba59e..3638f6f1fc 100644
--- a/railties/environments/shared.rb
+++ b/railties/environments/shared.rb
@@ -14,6 +14,7 @@ ADDITIONAL_LOAD_PATHS.concat %w(
app/models
app/controllers
app/helpers
+ app/apis
config
lib
vendor
@@ -23,6 +24,7 @@ ADDITIONAL_LOAD_PATHS.concat %w(
vendor/activerecord/lib
vendor/actionpack/lib
vendor/actionmailer/lib
+ vendor/actionservice/lib
).map { |dir| "#{RAILS_ROOT}/#{dir}" }
# Prepend to $LOAD_PATH
@@ -34,6 +36,7 @@ require 'active_support'
require 'active_record'
require 'action_controller'
require 'action_mailer'
+require 'action_service'
# Environment-specific configuration.
@@ -54,12 +57,8 @@ rescue StandardError
)
end
-[ActiveRecord::Base, ActionController::Base, ActionMailer::Base].each do |klass|
- klass.logger ||= RAILS_DEFAULT_LOGGER
-end
-[ActionController::Base, ActionMailer::Base].each do |klass|
- klass.template_root ||= "#{RAILS_ROOT}/app/views/"
-end
+[ActiveRecord, ActionController, ActionMailer].each { |mod| mod::Base.logger ||= RAILS_DEFAULT_LOGGER }
+[ActionController, ActionMailer].each { |mod| mod::Base.template_root ||= "#{RAILS_ROOT}/app/views/" }
ActionController::Routing::Routes.reload
# Include your app's configuration here:
diff --git a/railties/environments/shared_for_gem.rb b/railties/environments/shared_for_gem.rb
index 6ee762de6a..dd2c7c2d29 100644
--- a/railties/environments/shared_for_gem.rb
+++ b/railties/environments/shared_for_gem.rb
@@ -14,6 +14,7 @@ ADDITIONAL_LOAD_PATHS.concat %w(
app/models
app/controllers
app/helpers
+ app/apis
config
lib
vendor
@@ -29,6 +30,7 @@ require_gem 'activesupport'
require_gem 'activerecord'
require_gem 'actionpack'
require_gem 'actionmailer'
+require_gem 'actionservice'
require_gem 'rails'
@@ -50,12 +52,8 @@ rescue StandardError
)
end
-[ActiveRecord::Base, ActionController::Base, ActionMailer::Base].each do |klass|
- klass.logger ||= RAILS_DEFAULT_LOGGER
-end
-[ActionController::Base, ActionMailer::Base].each do |klass|
- klass.template_root ||= "#{RAILS_ROOT}/app/views/"
-end
+[ActiveRecord, ActionController, ActionMailer].each { |mod| mod::Base.logger ||= RAILS_DEFAULT_LOGGER }
+[ActionController, ActionMailer].each { |mod| mod::Base.template_root ||= "#{RAILS_ROOT}/app/views/" }
ActionController::Routing::Routes.reload
# Include your app's configuration here: