annotate config/initializers/new_framework_defaults_6_0.rb @ 479:b493db1f40b0

Validate format
author nanaya <me@nanaya.pro>
date Sat, 10 Oct 2020 18:16:12 +0900
parents fd3078b4d355
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
467
fd3078b4d355 Update to latest rails
nanaya <me@nanaya.pro>
parents:
diff changeset
1 # Be sure to restart your server when you modify this file.
fd3078b4d355 Update to latest rails
nanaya <me@nanaya.pro>
parents:
diff changeset
2 #
fd3078b4d355 Update to latest rails
nanaya <me@nanaya.pro>
parents:
diff changeset
3 # This file contains migration options to ease your Rails 6.0 upgrade.
fd3078b4d355 Update to latest rails
nanaya <me@nanaya.pro>
parents:
diff changeset
4 #
fd3078b4d355 Update to latest rails
nanaya <me@nanaya.pro>
parents:
diff changeset
5 # Once upgraded flip defaults one by one to migrate to the new default.
fd3078b4d355 Update to latest rails
nanaya <me@nanaya.pro>
parents:
diff changeset
6 #
fd3078b4d355 Update to latest rails
nanaya <me@nanaya.pro>
parents:
diff changeset
7 # Read the Guide for Upgrading Ruby on Rails for more info on each option.
fd3078b4d355 Update to latest rails
nanaya <me@nanaya.pro>
parents:
diff changeset
8
fd3078b4d355 Update to latest rails
nanaya <me@nanaya.pro>
parents:
diff changeset
9 # Don't force requests from old versions of IE to be UTF-8 encoded.
fd3078b4d355 Update to latest rails
nanaya <me@nanaya.pro>
parents:
diff changeset
10 # Rails.application.config.action_view.default_enforce_utf8 = false
fd3078b4d355 Update to latest rails
nanaya <me@nanaya.pro>
parents:
diff changeset
11
fd3078b4d355 Update to latest rails
nanaya <me@nanaya.pro>
parents:
diff changeset
12 # Embed purpose and expiry metadata inside signed and encrypted
fd3078b4d355 Update to latest rails
nanaya <me@nanaya.pro>
parents:
diff changeset
13 # cookies for increased security.
fd3078b4d355 Update to latest rails
nanaya <me@nanaya.pro>
parents:
diff changeset
14 #
fd3078b4d355 Update to latest rails
nanaya <me@nanaya.pro>
parents:
diff changeset
15 # This option is not backwards compatible with earlier Rails versions.
fd3078b4d355 Update to latest rails
nanaya <me@nanaya.pro>
parents:
diff changeset
16 # It's best enabled when your entire app is migrated and stable on 6.0.
fd3078b4d355 Update to latest rails
nanaya <me@nanaya.pro>
parents:
diff changeset
17 # Rails.application.config.action_dispatch.use_cookies_with_metadata = true
fd3078b4d355 Update to latest rails
nanaya <me@nanaya.pro>
parents:
diff changeset
18
fd3078b4d355 Update to latest rails
nanaya <me@nanaya.pro>
parents:
diff changeset
19 # Change the return value of `ActionDispatch::Response#content_type` to Content-Type header without modification.
fd3078b4d355 Update to latest rails
nanaya <me@nanaya.pro>
parents:
diff changeset
20 # Rails.application.config.action_dispatch.return_only_media_type_on_content_type = false
fd3078b4d355 Update to latest rails
nanaya <me@nanaya.pro>
parents:
diff changeset
21
fd3078b4d355 Update to latest rails
nanaya <me@nanaya.pro>
parents:
diff changeset
22 # Return false instead of self when enqueuing is aborted from a callback.
fd3078b4d355 Update to latest rails
nanaya <me@nanaya.pro>
parents:
diff changeset
23 # Rails.application.config.active_job.return_false_on_aborted_enqueue = true
fd3078b4d355 Update to latest rails
nanaya <me@nanaya.pro>
parents:
diff changeset
24
fd3078b4d355 Update to latest rails
nanaya <me@nanaya.pro>
parents:
diff changeset
25 # Send Active Storage analysis and purge jobs to dedicated queues.
fd3078b4d355 Update to latest rails
nanaya <me@nanaya.pro>
parents:
diff changeset
26 # Rails.application.config.active_storage.queues.analysis = :active_storage_analysis
fd3078b4d355 Update to latest rails
nanaya <me@nanaya.pro>
parents:
diff changeset
27 # Rails.application.config.active_storage.queues.purge = :active_storage_purge
fd3078b4d355 Update to latest rails
nanaya <me@nanaya.pro>
parents:
diff changeset
28
fd3078b4d355 Update to latest rails
nanaya <me@nanaya.pro>
parents:
diff changeset
29 # When assigning to a collection of attachments declared via `has_many_attached`, replace existing
fd3078b4d355 Update to latest rails
nanaya <me@nanaya.pro>
parents:
diff changeset
30 # attachments instead of appending. Use #attach to add new attachments without replacing existing ones.
fd3078b4d355 Update to latest rails
nanaya <me@nanaya.pro>
parents:
diff changeset
31 # Rails.application.config.active_storage.replace_on_assign_to_many = true
fd3078b4d355 Update to latest rails
nanaya <me@nanaya.pro>
parents:
diff changeset
32
fd3078b4d355 Update to latest rails
nanaya <me@nanaya.pro>
parents:
diff changeset
33 # Use ActionMailer::MailDeliveryJob for sending parameterized and normal mail.
fd3078b4d355 Update to latest rails
nanaya <me@nanaya.pro>
parents:
diff changeset
34 #
fd3078b4d355 Update to latest rails
nanaya <me@nanaya.pro>
parents:
diff changeset
35 # The default delivery jobs (ActionMailer::Parameterized::DeliveryJob, ActionMailer::DeliveryJob),
fd3078b4d355 Update to latest rails
nanaya <me@nanaya.pro>
parents:
diff changeset
36 # will be removed in Rails 6.1. This setting is not backwards compatible with earlier Rails versions.
fd3078b4d355 Update to latest rails
nanaya <me@nanaya.pro>
parents:
diff changeset
37 # If you send mail in the background, job workers need to have a copy of
fd3078b4d355 Update to latest rails
nanaya <me@nanaya.pro>
parents:
diff changeset
38 # MailDeliveryJob to ensure all delivery jobs are processed properly.
fd3078b4d355 Update to latest rails
nanaya <me@nanaya.pro>
parents:
diff changeset
39 # Make sure your entire app is migrated and stable on 6.0 before using this setting.
fd3078b4d355 Update to latest rails
nanaya <me@nanaya.pro>
parents:
diff changeset
40 # Rails.application.config.action_mailer.delivery_job = "ActionMailer::MailDeliveryJob"
fd3078b4d355 Update to latest rails
nanaya <me@nanaya.pro>
parents:
diff changeset
41
fd3078b4d355 Update to latest rails
nanaya <me@nanaya.pro>
parents:
diff changeset
42 # Enable the same cache key to be reused when the object being cached of type
fd3078b4d355 Update to latest rails
nanaya <me@nanaya.pro>
parents:
diff changeset
43 # `ActiveRecord::Relation` changes by moving the volatile information (max updated at and count)
fd3078b4d355 Update to latest rails
nanaya <me@nanaya.pro>
parents:
diff changeset
44 # of the relation's cache key into the cache version to support recycling cache key.
fd3078b4d355 Update to latest rails
nanaya <me@nanaya.pro>
parents:
diff changeset
45 # Rails.application.config.active_record.collection_cache_versioning = true