Set ActiveSupport.to_time_preserves_timezone = true

code-maintenance/45463-apply-rails-5-0-defaults
Christophe Bliard 2 years ago
parent 3b7f6242a9
commit d21b54c41e
No known key found for this signature in database
GPG Key ID: 2BC07603210C3FA4
  1. 2
      config/initializers/new_framework_defaults_5_0.rb

@ -22,7 +22,7 @@
# https://guides.rubyonrails.org/configuring.html#activesupport-to-time-preserves-timezone
# Make Ruby 2.4 preserve the timezone of the receiver when calling `to_time`.
# Previous versions had false. Rails 5.0+ default is true.
# ActiveSupport.to_time_preserves_timezone = true
ActiveSupport.to_time_preserves_timezone = true
# https://guides.rubyonrails.org/configuring.html#config-active-record-belongs-to-required-by-default
# Require `belongs_to` associations by default. Previous versions had false.

Loading…
Cancel
Save