提交 26df30da 编写于 作者: X Xavier Noria

syncs the configuring guide with master [ci skip]

上级 ed46a61d
......@@ -145,7 +145,7 @@ defaults to `:debug` for all environments. The available log levels are: `:debug
* `secret_key_base` is used for specifying a key which allows sessions for the application to be verified against a known secure key to prevent tampering. Applications get a random generated key in test and development environments, other environments should set one in `config/credentials.yml.enc`.
* `config.public_file_server.enabled` configures Rails to serve static files from the public directory. This option defaults to `true`, but in the production environment it is set to `false` because the server software (e.g. NGINX or Apache) used to run the application should serve static files instead. If you are running or testing your app in production mode using WEBrick (it is not recommended to use WEBrick in production) set the option to `true.` Otherwise, you won't be able to use page caching and request for files that exist under the public directory.
* `config.public_file_server.enabled` configures Rails to serve static files from the public directory. This option defaults to `true`, but in the production environment it is set to `false` because the server software (e.g. NGINX or Apache) used to run the application should serve static files instead. If you are running or testing your app in production mode using WEBrick (it is not recommended to use WEBrick in production) set the option to `true`. Otherwise, you won't be able to use page caching and request for files that exist under the public directory.
* `config.session_store` specifies what class to use to store the session. Possible values are `:cookie_store` which is the default, `:mem_cache_store`, and `:disabled`. The last one tells Rails not to deal with sessions. Defaults to a cookie store with application name as the session key. Custom session stores can also be specified:
......@@ -157,6 +157,13 @@ defaults to `:debug` for all environments. The available log levels are: `:debug
* `config.time_zone` sets the default time zone for the application and enables time zone awareness for Active Record.
* `config.autoloader` sets the autoloading mode. This option defaults to `:zeitwerk` if `6.0` is specified in `config.load_defaults`. Applications can still use the classic autoloader by setting this value to `:classic` after loading the framework defaults:
```ruby
config.load_defaults "6.0"
config.autoloader = :classic
```
### Configuring Assets
* `config.assets.enabled` a flag that controls whether the asset
......@@ -383,6 +390,12 @@ All these configuration options are delegated to the `I18n` library.
having to send a query to the database to get this information.
Defaults to `true`.
* `config.active_record.collection_cache_versioning` enables the same cache key
to be reused when the object being cached of type `ActiveRecord::Relation`
changes by moving the volatile information (max updated at and count) of
the relation's cache key into the cache version to support recycling cache key.
Defaults to `false`.
The MySQL adapter adds one additional configuration option:
* `ActiveRecord::ConnectionAdapters::Mysql2Adapter.emulate_booleans` controls whether Active Record will consider all `tinyint(1)` columns as booleans. Defaults to `true`.
......@@ -886,12 +899,14 @@ text/javascript image/svg+xml application/postscript application/x-shockwave-fla
#### With '6.0':
- `config.autoloader`: `:zeitwerk`
- `config.action_view.default_enforce_utf8`: `false`
- `config.action_dispatch.use_cookies_with_metadata`: `true`
- `config.action_mailer.delivery_job`: `"ActionMailer::MailDeliveryJob"`
- `config.active_job.return_false_on_aborted_enqueue`: `true`
- `config.active_storage.queues.analysis`: `:active_storage_analysis`
- `config.active_storage.queues.purge`: `:active_storage_purge`
- `config.active_record.collection_cache_versioning`: `true`
### Configuring a Database
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册