1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

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
This commit is contained in:
Sean Griffin 2016-01-07 09:41:57 -07:00
parent a04cb1e376
commit 43ccebc1db

View file

@ -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