diff options
author | José Valim <jose.valim@gmail.com> | 2010-01-25 01:06:12 +0100 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-01-25 01:12:22 +0100 |
commit | 3b6f659fb6b1ffd323c0bbad36630cc97b96bd5f (patch) | |
tree | acd1fdb20cd5a63e6867c2befb07de8f46ab66ec /activerecord | |
parent | 396003fc48d7c0ba206ad059646c7414bee22a36 (diff) | |
download | rails-3b6f659fb6b1ffd323c0bbad36630cc97b96bd5f.tar.gz rails-3b6f659fb6b1ffd323c0bbad36630cc97b96bd5f.tar.bz2 rails-3b6f659fb6b1ffd323c0bbad36630cc97b96bd5f.zip |
Add active_model/railtie back to generated boot.rb, add models back to paths, load active_support/railtie since we need it and ensure default logger is set before config.
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/lib/active_record/railtie.rb | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/activerecord/lib/active_record/railtie.rb b/activerecord/lib/active_record/railtie.rb index 7b6d792931..18d7cc0187 100644 --- a/activerecord/lib/active_record/railtie.rb +++ b/activerecord/lib/active_record/railtie.rb @@ -23,6 +23,10 @@ module ActiveRecord ActiveRecord::Base.default_timezone = :utc end + initializer "active_record.logger" do + ActiveRecord::Base.logger ||= ::Rails.logger + end + initializer "active_record.set_configs" do |app| app.config.active_record.each do |k,v| ActiveRecord::Base.send "#{k}=", v @@ -71,11 +75,6 @@ module ActiveRecord end end - # TODO: ActiveRecord::Base.logger should delegate to its own config.logger - initializer "active_record.logger" do - ActiveRecord::Base.logger ||= ::Rails.logger - end - initializer "active_record.i18n_deprecation" do require 'active_support/i18n' |