]> git.openstreetmap.org Git - rails.git/blob - config/initializers/new_framework_defaults_7_0.rb
Merge remote-tracking branch 'upstream/pull/3398'
[rails.git] / config / initializers / new_framework_defaults_7_0.rb
1 # Be sure to restart your server when you modify this file.
2 #
3 # This file eases your Rails 7.0 framework defaults upgrade.
4 #
5 # Uncomment each configuration one by one to switch to the new default.
6 # Once your application is ready to run with all new defaults, you can remove
7 # this file and set the `config.load_defaults` to `7.0`.
8 #
9 # Read the Guide for Upgrading Ruby on Rails for more info on each option.
10 # https://guides.rubyonrails.org/upgrading_ruby_on_rails.html
11
12 # `button_to` view helper will render `<button>` element, regardless of whether
13 # or not the content is passed as the first argument or as a block.
14 # Rails.application.config.action_view.button_to_generates_button_tag = true
15
16 # `stylesheet_link_tag` view helper will not render the media attribute by default.
17 # Rails.application.config.action_view.apply_stylesheet_media_default = false
18
19 # Change the digest class for the key generators to `OpenSSL::Digest::SHA256`.
20 # Changing this default means invalidate all encrypted messages generated by
21 # your application and, all the encrypted cookies. Only change this after you
22 # rotated all the messages using the key rotator.
23 #
24 # See upgrading guide for more information on how to build a rotator.
25 # https://guides.rubyonrails.org/v7.0/upgrading_ruby_on_rails.html
26 # Rails.application.config.active_support.key_generator_hash_digest_class = OpenSSL::Digest::SHA256
27
28 # Change the digest class for ActiveSupport::Digest.
29 # Changing this default means that for example Etags change and
30 # various cache keys leading to cache invalidation.
31 # Rails.application.config.active_support.hash_digest_class = OpenSSL::Digest::SHA256
32
33 # Don't override ActiveSupport::TimeWithZone.name and use the default Ruby
34 # implementation.
35 # Rails.application.config.active_support.remove_deprecated_time_with_zone_name = true
36
37 # Change the format of the cache entry.
38 # Changing this default means that all new cache entries added to the cache
39 # will have a different format that is not supported by Rails 6.1 applications.
40 # Only change this value after your application is fully deployed to Rails 7.0
41 # and you have no plans to rollback.
42 # Rails.application.config.active_support.cache_format_version = 7.0
43
44 # Calls `Rails.application.executor.wrap` around test cases.
45 # This makes test cases behave closer to an actual request or job.
46 # Several features that are normally disabled in test, such as Active Record query cache
47 # and asynchronous queries will then be enabled.
48 # Rails.application.config.active_support.executor_around_test_case = true
49
50 # Define the isolation level of most of Rails internal state.
51 # If you use a fiber based server or job processor, you should set it to `:fiber`.
52 # Otherwise the default of `:thread` if preferable.
53 # Rails.application.config.active_support.isolation_level = :thread
54
55 # Set both the `:open_timeout` and `:read_timeout` values for `:smtp` delivery method.
56 # Rails.application.config.action_mailer.smtp_timeout = 5
57
58 # The ActiveStorage video previewer will now use scene change detection to generate
59 # better preview images (rather than the previous default of using the first frame
60 # of the video).
61 # Rails.application.config.active_storage.video_preview_arguments =
62 #   "-vf 'select=eq(n\\,0)+eq(key\\,1)+gt(scene\\,0.015),loop=loop=-1:size=2,trim=start_frame=1' -frames:v 1 -f image2"
63
64 # Automatically infer `inverse_of` for associations with a scope.
65 # Rails.application.config.active_record.automatic_scope_inversing = true
66
67 # Raise when running tests if fixtures contained foreign key violations
68 # Rails.application.config.active_record.verify_foreign_keys_for_fixtures = true
69
70 # Disable partial inserts.
71 # This default means that all columns will be referenced in INSERT queries
72 # regardless of whether they have a default or not.
73 # Rails.application.config.active_record.partial_inserts = false
74 #
75 # Protect from open redirect attacks in `redirect_back_or_to` and `redirect_to`.
76 # Rails.application.config.action_controller.raise_on_open_redirects = true
77
78 # Change the variant processor for Active Storage.
79 # Changing this default means updating all places in your code that
80 # generate variants to use image processing macros and ruby-vips
81 # operations. See the upgrading guide for detail on the changes required.
82 # The `:mini_magick` option is not deprecated; it's fine to keep using it.
83 # Rails.application.config.active_storage.variant_processor = :vips
84
85 # If you're upgrading and haven't set `cookies_serializer` previously, your cookie serializer
86 # was `:marshal`. Convert all cookies to JSON, using the `:hybrid` formatter.
87 #
88 # If you're confident all your cookies are JSON formatted, you can switch to the `:json` formatter.
89 #
90 # Continue to use `:marshal` for backward-compatibility with old cookies.
91 #
92 # If you have configured the serializer elsewhere, you can remove this.
93 #
94 # See https://guides.rubyonrails.org/action_controller_overview.html#cookies for more information.
95 # Rails.application.config.action_dispatch.cookies_serializer = :hybrid
96
97 # Enable parameter wrapping for JSON.
98 # Previously this was set in an initializer. It's fine to keep using that initializer if you've customized it.
99 # To disable parameter wrapping entirely, set this config to `false`.
100 # Rails.application.config.action_controller.wrap_parameters_by_default = true
101
102 # Specifies whether generated namespaced UUIDs follow the RFC 4122 standard for namespace IDs provided as a
103 # `String` to `Digest::UUID.uuid_v3` or `Digest::UUID.uuid_v5` method calls.
104 #
105 # See https://guides.rubyonrails.org/configuring.html#config-active-support-use-rfc4122-namespaced-uuids for
106 # more information.
107 # Rails.application.config.active_support.use_rfc4122_namespaced_uuids = true
108
109 # Change the default headers to disable browsers' flawed legacy XSS protection.
110 # Rails.application.config.action_dispatch.default_headers = {
111 #   "X-Frame-Options" => "SAMEORIGIN",
112 #   "X-XSS-Protection" => "0",
113 #   "X-Content-Type-Options" => "nosniff",
114 #   "X-Download-Options" => "noopen",
115 #   "X-Permitted-Cross-Domain-Policies" => "none",
116 #   "Referrer-Policy" => "strict-origin-when-cross-origin"
117 # }