Skip to content

Commit 43ccebc

Browse files
committed
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 rails#22839
1 parent a04cb1e commit 43ccebc

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

activerecord/lib/active_record/railtie.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ class Railtie < Rails::Railtie # :nodoc:
7171
ActiveSupport.on_load(:active_record) do
7272
self.time_zone_aware_attributes = true
7373
self.default_timezone = :utc
74+
self.time_zone_aware_types = ActiveRecord::Base.time_zone_aware_types
7475
end
7576
end
7677

0 commit comments

Comments
 (0)