]> git.openstreetmap.org Git - rails.git/blob - config/initializers/new_framework_defaults_6_1.rb
Localisation updates from https://translatewiki.net.
[rails.git] / config / initializers / new_framework_defaults_6_1.rb
1 # Be sure to restart your server when you modify this file.
2 #
3 # This file contains migration options to ease your Rails 6.1 upgrade.
4 #
5 # Once upgraded flip defaults one by one to migrate to the new default.
6 #
7 # Read the Guide for Upgrading Ruby on Rails for more info on each option.
8
9 # Support for inversing belongs_to -> has_many Active Record associations.
10 Rails.application.config.active_record.has_many_inversing = true
11
12 # Track Active Storage variants in the database.
13 Rails.application.config.active_storage.track_variants = true
14
15 # Apply random variation to the delay when retrying failed jobs.
16 Rails.application.config.active_job.retry_jitter = 0.15
17
18 # Stop executing `after_enqueue`/`after_perform` callbacks if
19 # `before_enqueue`/`before_perform` respectively halts with `throw :abort`.
20 Rails.application.config.active_job.skip_after_callbacks_if_terminated = true
21
22 # Specify cookies SameSite protection level: either :none, :lax, or :strict.
23 #
24 # This change is not backwards compatible with earlier Rails versions.
25 # It's best enabled when your entire app is migrated and stable on 6.1.
26 Rails.application.config.action_dispatch.cookies_same_site_protection = :lax
27
28 # Generate CSRF tokens that are encoded in URL-safe Base64.
29 #
30 # This change is not backwards compatible with earlier Rails versions.
31 # It's best enabled when your entire app is migrated and stable on 6.1.
32 Rails.application.config.action_controller.urlsafe_csrf_tokens = true
33
34 # Specify whether `ActiveSupport::TimeZone.utc_to_local` returns a time with an
35 # UTC offset or a UTC time.
36 ActiveSupport.utc_to_local_returns_utc_offset_times = true
37
38 # Change the default HTTP status code to `308` when redirecting non-GET/HEAD
39 # requests to HTTPS in `ActionDispatch::SSL` middleware.
40 Rails.application.config.action_dispatch.ssl_default_redirect_status = 308
41
42 # Use new connection handling API. For most applications this won't have any
43 # effect. For applications using multiple databases, this new API provides
44 # support for granular connection swapping.
45 Rails.application.config.active_record.legacy_connection_handling = false
46
47 # Make `form_with` generate non-remote forms by default.
48 Rails.application.config.action_view.form_with_generates_remote_forms = false
49
50 # Set the default queue name for the incineration job to the queue adapter default.
51 Rails.application.config.action_mailbox.queues.incineration = nil
52
53 # Set the default queue name for the routing job to the queue adapter default.
54 Rails.application.config.action_mailbox.queues.routing = nil
55
56 # Generate a `Link` header that gives a hint to modern browsers about
57 # preloading assets when using `javascript_include_tag` and `stylesheet_link_tag`.
58 Rails.application.config.action_view.preload_links_header = true