diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2005-09-22 14:11:13 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2005-09-22 14:11:13 +0000 |
commit | 436d54c3f19fc80713d975482a28a95cfa60a1e4 (patch) | |
tree | 009ffcf3676c4bf760a5bb55605eaf585563a90c /railties | |
parent | 2a31691ee2c02af17471ffa0cdb267a8af633b50 (diff) | |
download | rails-436d54c3f19fc80713d975482a28a95cfa60a1e4.tar.gz rails-436d54c3f19fc80713d975482a28a95cfa60a1e4.tar.bz2 rails-436d54c3f19fc80713d975482a28a95cfa60a1e4.zip |
Only configure settings for loaded frameworks
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2304 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'railties')
-rw-r--r-- | railties/lib/initializer.rb | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/railties/lib/initializer.rb b/railties/lib/initializer.rb index ea14ddb5f6..e4f98fbb80 100644 --- a/railties/lib/initializer.rb +++ b/railties/lib/initializer.rb @@ -100,13 +100,15 @@ module Rails end def initialize_framework_logging - # TODO: Only do logging for frameworks loaded - [ActiveRecord, ActionController, ActionMailer].each { |mod| mod::Base.logger ||= RAILS_DEFAULT_LOGGER } + for framework in ([ :active_record, :action_controller, :action_mailer ] & configuration.frameworks) + framework.to_s.camelize.constantize.const_get("Base").logger ||= RAILS_DEFAULT_LOGGER + end end def initialize_framework_views - # TODO: Only do view setting for frameworks loaded - [ActionController, ActionMailer].each { |mod| mod::Base.template_root ||= configuration.view_path } + for framework in ([ :action_controller, :action_mailer ] & configuration.frameworks) + framework.to_s.camelize.constantize.const_get("Base").template_root ||= configuration.view_path + end end def initialize_routing |