From bc8e41247b2bdc37da8be4e963caf99451418cd2 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Fri, 18 Feb 2005 10:58:25 +0000 Subject: Integrated Action Service with the existing elements git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@660 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- railties/environments/shared.rb | 11 +++++------ railties/environments/shared_for_gem.rb | 10 ++++------ 2 files changed, 9 insertions(+), 12 deletions(-) (limited to 'railties/environments') 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: -- cgit v1.2.3