|
1 | 1 | # frozen_string_literal: true
|
| 2 | + |
2 | 3 | # Be sure to restart your server when you modify this file.
|
3 | 4 | #
|
4 | 5 | # This file eases your Rails 7.1 framework defaults upgrade.
|
|
14 | 15 | # to manually require files that are managed by the autoloader, which you shouldn't do anyway.
|
15 | 16 | # This will reduce the size of the load path, making `require` faster if you don't use bootsnap, or reduce the size
|
16 | 17 | # of the bootsnap cache if you use it.
|
17 |
| -# Rails.application.config.add_autoload_paths_to_load_path = false |
| 18 | +Rails.application.config.add_autoload_paths_to_load_path = false |
18 | 19 |
|
19 | 20 | # Remove the default X-Download-Options headers since it is used only by Internet Explorer.
|
20 | 21 | # If you need to support Internet Explorer, add back `"X-Download-Options" => "noopen"`.
|
21 |
| -# Rails.application.config.action_dispatch.default_headers = { |
22 |
| -# "X-Frame-Options" => "SAMEORIGIN", |
23 |
| -# "X-XSS-Protection" => "0", |
24 |
| -# "X-Content-Type-Options" => "nosniff", |
25 |
| -# "X-Permitted-Cross-Domain-Policies" => "none", |
26 |
| -# "Referrer-Policy" => "strict-origin-when-cross-origin" |
27 |
| -# } |
| 22 | +Rails.application.config.action_dispatch.default_headers = { |
| 23 | + 'X-Frame-Options' => 'SAMEORIGIN', |
| 24 | + 'X-XSS-Protection' => '0', |
| 25 | + 'X-Content-Type-Options' => 'nosniff', |
| 26 | + 'X-Permitted-Cross-Domain-Policies' => 'none', |
| 27 | + 'Referrer-Policy' => 'strict-origin-when-cross-origin' |
| 28 | +} |
28 | 29 |
|
29 | 30 | # Do not treat an `ActionController::Parameters` instance
|
30 | 31 | # as equal to an equivalent `Hash` by default.
|
31 |
| -# Rails.application.config.action_controller.allow_deprecated_parameters_hash_equality = false |
| 32 | +Rails.application.config.action_controller.allow_deprecated_parameters_hash_equality = false |
32 | 33 |
|
33 | 34 | # Active Record Encryption now uses SHA-256 as its hash digest algorithm. Important: If you have
|
34 | 35 | # data encrypted with previous Rails versions, there are two scenarios to consider:
|
|
49 | 50 | # Instead, run these callbacks on the instance most likely to have internal
|
50 | 51 | # state which matches what was committed to the database, typically the last
|
51 | 52 | # instance to save.
|
52 |
| -# Rails.application.config.active_record.run_commit_callbacks_on_first_saved_instances_in_transaction = false |
| 53 | +Rails.application.config.active_record.run_commit_callbacks_on_first_saved_instances_in_transaction = false |
53 | 54 |
|
54 | 55 | # Configures SQLite with a strict strings mode, which disables double-quoted string literals.
|
55 | 56 | #
|
|
58 | 59 | # it then considers them as string literals. Because of this, typos can silently go unnoticed.
|
59 | 60 | # For example, it is possible to create an index for a non existing column.
|
60 | 61 | # See https://www.sqlite.org/quirks.html#double_quoted_string_literals_are_accepted for more details.
|
61 |
| -# Rails.application.config.active_record.sqlite3_adapter_strict_strings_by_default = true |
| 62 | +Rails.application.config.active_record.sqlite3_adapter_strict_strings_by_default = true |
62 | 63 |
|
63 | 64 | # Disable deprecated singular associations names
|
64 |
| -# Rails.application.config.active_record.allow_deprecated_singular_associations_name = false |
| 65 | +Rails.application.config.active_record.allow_deprecated_singular_associations_name = false |
65 | 66 |
|
66 | 67 | # Enable the Active Job `BigDecimal` argument serializer, which guarantees
|
67 | 68 | # roundtripping. Without this serializer, some queue adapters may serialize
|
|
71 | 72 | # replicas will not be able to deserialize `BigDecimal` arguments from this
|
72 | 73 | # serializer. Therefore, this setting should only be enabled after all replicas
|
73 | 74 | # have been successfully upgraded to Rails 7.1.
|
74 |
| -# Rails.application.config.active_job.use_big_decimal_serializer = true |
| 75 | +Rails.application.config.active_job.use_big_decimal_serializer = true |
75 | 76 |
|
76 | 77 | # Specify if an `ArgumentError` should be raised if `Rails.cache` `fetch` or
|
77 | 78 | # `write` are given an invalid `expires_at` or `expires_in` time.
|
78 | 79 | # Options are `true`, and `false`. If `false`, the exception will be reported
|
79 | 80 | # as `handled` and logged instead.
|
80 |
| -# Rails.application.config.active_support.raise_on_invalid_cache_expiration_time = true |
| 81 | +Rails.application.config.active_support.raise_on_invalid_cache_expiration_time = true |
81 | 82 |
|
82 | 83 | # Specify whether Query Logs will format tags using the SQLCommenter format
|
83 | 84 | # (https://open-telemetry.github.io/opentelemetry-sqlcommenter/), or using the legacy format.
|
84 | 85 | # Options are `:legacy` and `:sqlcommenter`.
|
85 |
| -# Rails.application.config.active_record.query_log_tags_format = :sqlcommenter |
| 86 | +Rails.application.config.active_record.query_log_tags_format = :sqlcommenter |
86 | 87 |
|
87 | 88 | # Specify the default serializer used by `MessageEncryptor` and `MessageVerifier`
|
88 | 89 | # instances.
|
|
110 | 111 | # that have not yet been upgraded must be able to read messages from upgraded
|
111 | 112 | # servers, first deploy without changing the serializer, then set the serializer
|
112 | 113 | # in a subsequent deploy.
|
113 |
| -# Rails.application.config.active_support.message_serializer = :json_allow_marshal |
| 114 | +Rails.application.config.active_support.message_serializer = :json_allow_marshal |
114 | 115 |
|
115 | 116 | # Enable a performance optimization that serializes message data and metadata
|
116 | 117 | # together. This changes the message format, so messages serialized this way
|
|
121 | 122 | # not yet been upgraded must be able to read messages from upgraded servers,
|
122 | 123 | # leave this optimization off on the first deploy, then enable it on a
|
123 | 124 | # subsequent deploy.
|
124 |
| -# Rails.application.config.active_support.use_message_serializer_for_metadata = true |
| 125 | +Rails.application.config.active_support.use_message_serializer_for_metadata = true |
125 | 126 |
|
126 | 127 | # Set the maximum size for Rails log files.
|
127 | 128 | #
|
128 | 129 | # `config.load_defaults 7.1` does not set this value for environments other than
|
129 | 130 | # development and test.
|
130 | 131 | #
|
131 |
| -# if Rails.env.local? |
132 |
| -# Rails.application.config.log_file_size = 100 * 1024 * 1024 |
133 |
| -# end |
| 132 | +Rails.application.config.log_file_size = 100 * 1024 * 1024 if Rails.env.local? |
134 | 133 |
|
135 | 134 | # Enable raising on assignment to attr_readonly attributes. The previous
|
136 | 135 | # behavior would allow assignment but silently not persist changes to the
|
137 | 136 | # database.
|
138 |
| -# Rails.application.config.active_record.raise_on_assign_to_attr_readonly = true |
| 137 | +Rails.application.config.active_record.raise_on_assign_to_attr_readonly = true |
139 | 138 |
|
140 | 139 | # Enable validating only parent-related columns for presence when the parent is mandatory.
|
141 | 140 | # The previous behavior was to validate the presence of the parent record, which performed an extra query
|
142 | 141 | # to get the parent every time the child record was updated, even when parent has not changed.
|
143 |
| -# Rails.application.config.active_record.belongs_to_required_validates_foreign_key = false |
| 142 | +Rails.application.config.active_record.belongs_to_required_validates_foreign_key = false |
144 | 143 |
|
145 | 144 | # Enable precompilation of `config.filter_parameters`. Precompilation can
|
146 | 145 | # improve filtering performance, depending on the quantity and types of filters.
|
147 |
| -# Rails.application.config.precompile_filter_parameters = true |
| 146 | +Rails.application.config.precompile_filter_parameters = true |
148 | 147 |
|
149 | 148 | # Enable before_committed! callbacks on all enrolled records in a transaction.
|
150 | 149 | # The previous behavior was to only run the callbacks on the first copy of a record
|
151 | 150 | # if there were multiple copies of the same record enrolled in the transaction.
|
152 |
| -# Rails.application.config.active_record.before_committed_on_all_records = true |
| 151 | +Rails.application.config.active_record.before_committed_on_all_records = true |
153 | 152 |
|
154 | 153 | # Disable automatic column serialization into YAML.
|
155 | 154 | # To keep the historic behavior, you can set it to `YAML`, however it is
|
156 | 155 | # recommended to explicitly define the serialization method for each column
|
157 | 156 | # rather than to rely on a global default.
|
158 |
| -# Rails.application.config.active_record.default_column_serializer = nil |
| 157 | +Rails.application.config.active_record.default_column_serializer = nil |
159 | 158 |
|
160 | 159 | # Enable a performance optimization that serializes Active Record models
|
161 | 160 | # in a faster and more compact way.
|
|
164 | 163 | # not yet been upgraded must be able to read caches from upgraded servers,
|
165 | 164 | # leave this optimization off on the first deploy, then enable it on a
|
166 | 165 | # subsequent deploy.
|
167 |
| -# Rails.application.config.active_record.marshalling_format_version = 7.1 |
| 166 | +Rails.application.config.active_record.marshalling_format_version = 7.1 |
168 | 167 |
|
169 | 168 | # Run `after_commit` and `after_*_commit` callbacks in the order they are defined in a model.
|
170 | 169 | # This matches the behaviour of all other callbacks.
|
171 | 170 | # In previous versions of Rails, they ran in the inverse order.
|
172 |
| -# Rails.application.config.active_record.run_after_transaction_callbacks_in_order_defined = true |
| 171 | +Rails.application.config.active_record.run_after_transaction_callbacks_in_order_defined = true |
173 | 172 |
|
174 | 173 | # Whether a `transaction` block is committed or rolled back when exited via `return`, `break` or `throw`.
|
175 | 174 | #
|
176 |
| -# Rails.application.config.active_record.commit_transaction_on_non_local_return = true |
| 175 | +Rails.application.config.active_record.commit_transaction_on_non_local_return = true |
177 | 176 |
|
178 | 177 | # Controls when to generate a value for <tt>has_secure_token</tt> declarations.
|
179 | 178 | #
|
180 |
| -# Rails.application.config.active_record.generate_secure_token_on = :initialize |
| 179 | +Rails.application.config.active_record.generate_secure_token_on = :initialize |
181 | 180 |
|
182 | 181 | # ** Please read carefully, this must be configured in config/application.rb **
|
183 | 182 | # Change the format of the cache entry.
|
|
198 | 197 | #
|
199 | 198 | # In previous versions of Rails, Action View always used `Rails::HTML4::Sanitizer` as its vendor.
|
200 | 199 | #
|
201 |
| -# Rails.application.config.action_view.sanitizer_vendor = Rails::HTML::Sanitizer.best_supported_vendor |
| 200 | +Rails.application.config.action_view.sanitizer_vendor = Rails::HTML::Sanitizer.best_supported_vendor |
202 | 201 |
|
203 | 202 | # Configure Action Text to use an HTML5 standards-compliant sanitizer when it is supported on your
|
204 | 203 | # platform.
|
|
208 | 207 | #
|
209 | 208 | # In previous versions of Rails, Action Text always used `Rails::HTML4::Sanitizer` as its vendor.
|
210 | 209 | #
|
211 |
| -# Rails.application.config.action_text.sanitizer_vendor = Rails::HTML::Sanitizer.best_supported_vendor |
| 210 | +Rails.application.config.action_text.sanitizer_vendor = Rails::HTML::Sanitizer.best_supported_vendor |
212 | 211 |
|
213 | 212 | # Configure the log level used by the DebugExceptions middleware when logging
|
214 | 213 | # uncaught exceptions during requests
|
215 |
| -# Rails.application.config.action_dispatch.debug_exception_log_level = :error |
| 214 | +Rails.application.config.action_dispatch.debug_exception_log_level = :error |
216 | 215 |
|
217 | 216 | # Configure the test helpers in Action View, Action Dispatch, and rails-dom-testing to use HTML5
|
218 | 217 | # parsers.
|
|
221 | 220 | #
|
222 | 221 | # In previous versions of Rails, these test helpers always used an HTML4 parser.
|
223 | 222 | #
|
224 |
| -# Rails.application.config.dom_testing_default_html_version = :html5 |
| 223 | +Rails.application.config.dom_testing_default_html_version = :html5 |
0 commit comments