aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSean Griffin <sean@seantheprogrammer.com>2016-01-07 09:41:57 -0700
committerSean Griffin <sean@seantheprogrammer.com>2016-01-07 09:55:44 -0700
commit43ccebc1db072ba0c96a67de0b3db78fd8fd0973 (patch)
treefbb5eac697b76de0d36bbea7d3ce55e010a67bbe
parenta04cb1e3767e52871504857b4b81cbe58ec11b25 (diff)
downloadrails-43ccebc1db072ba0c96a67de0b3db78fd8fd0973.tar.gz
rails-43ccebc1db072ba0c96a67de0b3db78fd8fd0973.tar.bz2
rails-43ccebc1db072ba0c96a67de0b3db78fd8fd0973.zip
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
-rw-r--r--activerecord/lib/active_record/railtie.rb1
1 files changed, 1 insertions, 0 deletions
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