|
2 | 2 | # |
3 | 3 | # This file contains migration options to ease your Rails 5.0 upgrade. |
4 | 4 | # |
5 | | -# Once upgraded flip defaults one by one to migrate to the new default. |
6 | | -# |
7 | 5 | # Read the Guide for Upgrading Ruby on Rails for more info on each option. |
8 | 6 |
|
9 | | -Rails.application.config.raise_on_unfiltered_parameters = true |
10 | | - |
11 | 7 | # Enable per-form CSRF tokens. Previous versions had false. |
12 | | -Rails.application.config.action_controller.per_form_csrf_tokens = false |
| 8 | +Rails.application.config.action_controller.per_form_csrf_tokens = true |
13 | 9 |
|
14 | 10 | # Enable origin-checking CSRF mitigation. Previous versions had false. |
15 | | -Rails.application.config.action_controller.forgery_protection_origin_check = false |
| 11 | +Rails.application.config.action_controller.forgery_protection_origin_check = true |
| 12 | +Rails.application.config.action_controller.raise_on_unfiltered_parameters = true |
16 | 13 |
|
17 | 14 | # Make Ruby 2.4 preserve the timezone of the receiver when calling `to_time`. |
18 | 15 | # Previous versions had false. |
19 | | -ActiveSupport.to_time_preserves_timezone = false |
| 16 | +ActiveSupport.to_time_preserves_timezone = true |
20 | 17 |
|
21 | 18 | # Require `belongs_to` associations by default. Previous versions had false. |
22 | | -Rails.application.config.active_record.belongs_to_required_by_default = false |
| 19 | +Rails.application.config.active_record.belongs_to_required_by_default = true |
| 20 | + |
| 21 | +# Configure SSL options to enable HSTS with subdomains. Previous versions had false. |
| 22 | +Rails.application.config.ssl_options = { hsts: { subdomains: true } } |
23 | 23 |
|
24 | | -# Do not halt callback chains when a callback returns false. Previous versions had true. |
25 | | -ActiveSupport.halt_callback_chains_on_return_false = true |
| 24 | +# The Event model of the dummy app has a time column. Time columns will become time zone aware in Rails 5.1 |
| 25 | +ActiveRecord::Base.time_zone_aware_types = [:datetime, :time] |
0 commit comments