diff options
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/lib/active_record/railtie.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/activerecord/lib/active_record/railtie.rb b/activerecord/lib/active_record/railtie.rb index bc06333f1c..7b6d792931 100644 --- a/activerecord/lib/active_record/railtie.rb +++ b/activerecord/lib/active_record/railtie.rb @@ -8,7 +8,7 @@ require "rails" module ActiveRecord class Railtie < Rails::Railtie - plugin_name :active_record + railtie_name :active_record rake_tasks do load "active_record/railties/databases.rake" @@ -18,6 +18,11 @@ module ActiveRecord require "active_record/railties/subscriber" subscriber ActiveRecord::Railties::Subscriber.new + initializer "active_record.initialize_timezone" do + ActiveRecord::Base.time_zone_aware_attributes = true + ActiveRecord::Base.default_timezone = :utc + end + initializer "active_record.set_configs" do |app| app.config.active_record.each do |k,v| ActiveRecord::Base.send "#{k}=", v @@ -31,11 +36,6 @@ module ActiveRecord ActiveRecord::Base.establish_connection end - initializer "active_record.initialize_timezone" do - ActiveRecord::Base.time_zone_aware_attributes = true - ActiveRecord::Base.default_timezone = :utc - end - # Expose database runtime to controller for logging. initializer "active_record.log_runtime" do |app| require "active_record/railties/controller_runtime" |