mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
Only configure settings for loaded frameworks
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2304 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user