|
76 | 76 | # For example, it is possible to create an index for a non existing column. |
77 | 77 | # See https://www.sqlite.org/quirks.html#double_quoted_string_literals_are_accepted for more details. |
78 | 78 | #++ |
79 | | -# Rails.application.config.active_record.sqlite3_adapter_strict_strings_by_default = true |
| 79 | +Rails.application.config.active_record.sqlite3_adapter_strict_strings_by_default = true |
80 | 80 |
|
81 | 81 | ### |
82 | 82 | # Disable deprecated singular associations names. |
83 | 83 | #++ |
84 | | -# Rails.application.config.active_record.allow_deprecated_singular_associations_name = false |
| 84 | +Rails.application.config.active_record.allow_deprecated_singular_associations_name = false |
85 | 85 |
|
86 | 86 | ### |
87 | 87 | # Enable the Active Job `BigDecimal` argument serializer, which guarantees |
|
101 | 101 | # Options are `true`, and `false`. If `false`, the exception will be reported |
102 | 102 | # as `handled` and logged instead. |
103 | 103 | #++ |
104 | | -# Rails.application.config.active_support.raise_on_invalid_cache_expiration_time = true |
| 104 | +Rails.application.config.active_support.raise_on_invalid_cache_expiration_time = true |
105 | 105 |
|
106 | 106 | ### |
107 | 107 | # Specify whether Query Logs will format tags using the SQLCommenter format |
108 | 108 | # (https://open-telemetry.github.io/opentelemetry-sqlcommenter/), or using the legacy format. |
109 | 109 | # Options are `:legacy` and `:sqlcommenter`. |
110 | 110 | #++ |
111 | | -# Rails.application.config.active_record.query_log_tags_format = :sqlcommenter |
| 111 | +Rails.application.config.active_record.query_log_tags_format = :sqlcommenter |
112 | 112 |
|
113 | 113 | ### |
114 | 114 | # Specify the default serializer used by `MessageEncryptor` and `MessageVerifier` |
|
138 | 138 | # servers, first deploy without changing the serializer, then set the serializer |
139 | 139 | # in a subsequent deploy. |
140 | 140 | #++ |
141 | | -# Rails.application.config.active_support.message_serializer = :json_allow_marshal |
| 141 | +Rails.application.config.active_support.message_serializer = :json_allow_marshal |
142 | 142 |
|
143 | 143 | ### |
144 | 144 | # Enable a performance optimization that serializes message data and metadata |
|
151 | 151 | # leave this optimization off on the first deploy, then enable it on a |
152 | 152 | # subsequent deploy. |
153 | 153 | #++ |
154 | | -# Rails.application.config.active_support.use_message_serializer_for_metadata = true |
| 154 | +Rails.application.config.active_support.use_message_serializer_for_metadata = true |
155 | 155 |
|
156 | 156 | ### |
157 | 157 | # Set the maximum size for Rails log files. |
158 | 158 | # |
159 | 159 | # `config.load_defaults 7.1` does not set this value for environments other than |
160 | 160 | # development and test. |
161 | 161 | #++ |
162 | | -# if Rails.env.local? |
163 | | -# Rails.application.config.log_file_size = 100 * 1024 * 1024 |
164 | | -# end |
| 162 | +if Rails.env.local? |
| 163 | + Rails.application.config.log_file_size = 100 * 1024 * 1024 |
| 164 | +end |
165 | 165 |
|
166 | 166 | ### |
167 | 167 | # Enable raising on assignment to attr_readonly attributes. The previous |
168 | 168 | # behavior would allow assignment but silently not persist changes to the |
169 | 169 | # database. |
170 | 170 | #++ |
171 | | -# Rails.application.config.active_record.raise_on_assign_to_attr_readonly = true |
| 171 | +Rails.application.config.active_record.raise_on_assign_to_attr_readonly = true |
172 | 172 |
|
173 | 173 | ### |
174 | 174 | # Enable validating only parent-related columns for presence when the parent is mandatory. |
175 | 175 | # The previous behavior was to validate the presence of the parent record, which performed an extra query |
176 | 176 | # to get the parent every time the child record was updated, even when parent has not changed. |
177 | 177 | #++ |
178 | | -# Rails.application.config.active_record.belongs_to_required_validates_foreign_key = false |
| 178 | +Rails.application.config.active_record.belongs_to_required_validates_foreign_key = false |
179 | 179 |
|
180 | 180 | ### |
181 | 181 | # Enable precompilation of `config.filter_parameters`. Precompilation can |
182 | 182 | # improve filtering performance, depending on the quantity and types of filters. |
183 | 183 | #++ |
184 | | -# Rails.application.config.precompile_filter_parameters = true |
| 184 | +Rails.application.config.precompile_filter_parameters = true |
| 185 | + |
| 186 | +### |
| 187 | +# Enable automatic setting of inverse_of for has_many associations. |
| 188 | +# This will automatically set the inverse_of option for has_many associations |
| 189 | +# when the inverse association is defined. |
| 190 | +#++ |
| 191 | +Rails.application.config.active_record.automatic_scope_inversing = true |
185 | 192 |
|
186 | 193 | ### |
187 | 194 | # Enable before_committed! callbacks on all enrolled records in a transaction. |
188 | 195 | # The previous behavior was to only run the callbacks on the first copy of a record |
189 | 196 | # if there were multiple copies of the same record enrolled in the transaction. |
190 | 197 | #++ |
191 | | -# Rails.application.config.active_record.before_committed_on_all_records = true |
| 198 | +Rails.application.config.active_record.before_committed_on_all_records = true |
192 | 199 |
|
193 | 200 | ### |
194 | 201 | # Disable automatic column serialization into YAML. |
195 | 202 | # To keep the historic behavior, you can set it to `YAML`, however it is |
196 | 203 | # recommended to explicitly define the serialization method for each column |
197 | 204 | # rather than to rely on a global default. |
198 | 205 | #++ |
199 | | -# Rails.application.config.active_record.default_column_serializer = nil |
| 206 | +Rails.application.config.active_record.default_column_serializer = nil |
200 | 207 |
|
201 | 208 | ### |
202 | 209 | # Enable a performance optimization that serializes Active Record models |
|
207 | 214 | # leave this optimization off on the first deploy, then enable it on a |
208 | 215 | # subsequent deploy. |
209 | 216 | #++ |
210 | | -# Rails.application.config.active_record.marshalling_format_version = 7.1 |
| 217 | +Rails.application.config.active_record.marshalling_format_version = 7.1 |
211 | 218 |
|
212 | 219 | ### |
213 | 220 | # Run `after_commit` and `after_*_commit` callbacks in the order they are defined in a model. |
214 | 221 | # This matches the behaviour of all other callbacks. |
215 | 222 | # In previous versions of Rails, they ran in the inverse order. |
216 | 223 | #++ |
217 | | -# Rails.application.config.active_record.run_after_transaction_callbacks_in_order_defined = true |
| 224 | +Rails.application.config.active_record.run_after_transaction_callbacks_in_order_defined = true |
218 | 225 |
|
219 | 226 | ### |
220 | 227 | # Whether a `transaction` block is committed or rolled back when exited via `return`, `break` or `throw`. |
221 | 228 | #++ |
222 | | -# Rails.application.config.active_record.commit_transaction_on_non_local_return = true |
| 229 | +Rails.application.config.active_record.commit_transaction_on_non_local_return = true |
223 | 230 |
|
224 | 231 | ### |
225 | 232 | # Controls when to generate a value for <tt>has_secure_token</tt> declarations. |
226 | 233 | #++ |
227 | | -# Rails.application.config.active_record.generate_secure_token_on = :initialize |
| 234 | +Rails.application.config.active_record.generate_secure_token_on = :initialize |
228 | 235 |
|
229 | 236 | ### |
230 | 237 | # ** Please read carefully, this must be configured in config/application.rb ** |
|
250 | 257 | # |
251 | 258 | # In previous versions of Rails, Action View always used `Rails::HTML4::Sanitizer` as its vendor. |
252 | 259 | #++ |
253 | | -# Rails.application.config.action_view.sanitizer_vendor = Rails::HTML::Sanitizer.best_supported_vendor |
| 260 | +Rails.application.config.action_view.sanitizer_vendor = Rails::HTML::Sanitizer.best_supported_vendor |
254 | 261 |
|
255 | 262 | ### |
256 | 263 | # Configure Action Text to use an HTML5 standards-compliant sanitizer when it is supported on your |
|
260 | 267 | # sanitizers if they are supported, else fall back to HTML4 sanitizers. |
261 | 268 | # |
262 | 269 | # In previous versions of Rails, Action Text always used `Rails::HTML4::Sanitizer` as its vendor. |
263 | | -#++ |
264 | | -# Rails.application.config.action_text.sanitizer_vendor = Rails::HTML::Sanitizer.best_supported_vendor |
| 270 | +Rails.application.config.action_text.sanitizer_vendor = Rails::HTML::Sanitizer.best_supported_vendor |
265 | 271 |
|
266 | 272 | ### |
267 | 273 | # Configure the log level used by the DebugExceptions middleware when logging |
268 | 274 | # uncaught exceptions during requests. |
269 | 275 | #++ |
270 | | -# Rails.application.config.action_dispatch.debug_exception_log_level = :error |
| 276 | +Rails.application.config.action_dispatch.debug_exception_log_level = :error |
271 | 277 |
|
272 | 278 | ### |
273 | 279 | # Configure the test helpers in Action View, Action Dispatch, and rails-dom-testing to use HTML5 |
|
277 | 283 | # |
278 | 284 | # In previous versions of Rails, these test helpers always used an HTML4 parser. |
279 | 285 | #++ |
280 | | -# Rails.application.config.dom_testing_default_html_version = :html5 |
| 286 | +Rails.application.config.dom_testing_default_html_version = :html5 |
0 commit comments