Created
August 1, 2022 10:55
-
-
Save VelizarHristov/f2cc40d1bf18b7f5a38a7dcad224d029 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Be sure to restart your server when you modify this file. | |
# | |
# This file contains migration options to ease your Rails 5.0 upgrade. | |
# | |
# Once upgraded flip defaults one by one to migrate to the new default. | |
# | |
# Read the Rails 5.0 release notes for more info on each option. | |
### | |
### OLD DEFAULTS ### | |
### | |
# Make Ruby 2.4 preserve the timezone of the receiver when calling `to_time`. | |
# Previous versions had false. | |
# TODO: enable when Ruby 2.4 comes out | |
ActiveSupport.to_time_preserves_timezone = false | |
### | |
### NEW DEFAULTS ### | |
### | |
# Enable per-form CSRF tokens. Previous versions had false. | |
Rails.application.config.action_controller.per_form_csrf_tokens = true | |
# Enable origin-checking CSRF mitigation. Previous versions had false. | |
Rails.application.config.action_controller.forgery_protection_origin_check = true | |
# Require `belongs_to` associations by default. Previous versions had false. | |
Rails.application.config.active_record.belongs_to_required_by_default = true | |
Rails.application.config.active_record.time_zone_aware_types = [:datetime, :time] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment