From 43ccebc1db072ba0c96a67de0b3db78fd8fd0973 Mon Sep 17 00:00:00 2001 From: Sean Griffin Date: Thu, 7 Jan 2016 09:41:57 -0700 Subject: Ensure `config.active_record.time_zone_aware_types` is always set While the option on `ActiveRecord::Base` is always around, we need to explicitly set it on the config object. Otherwise the recommended configuration change results in an error. Fixes #22839 --- activerecord/lib/active_record/railtie.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'activerecord') diff --git a/activerecord/lib/active_record/railtie.rb b/activerecord/lib/active_record/railtie.rb index 17fbe5a742..38916f7376 100644 --- a/activerecord/lib/active_record/railtie.rb +++ b/activerecord/lib/active_record/railtie.rb @@ -71,6 +71,7 @@ module ActiveRecord ActiveSupport.on_load(:active_record) do self.time_zone_aware_attributes = true self.default_timezone = :utc + self.time_zone_aware_types = ActiveRecord::Base.time_zone_aware_types end end -- cgit v1.2.3