diff options
Diffstat (limited to 'guides/source')
-rw-r--r-- | guides/source/5_2_release_notes.md | 15 | ||||
-rw-r--r-- | guides/source/active_storage_overview.md | 32 | ||||
-rw-r--r-- | guides/source/configuring.md | 4 | ||||
-rw-r--r-- | guides/source/engines.md | 12 |
4 files changed, 37 insertions, 26 deletions
diff --git a/guides/source/5_2_release_notes.md b/guides/source/5_2_release_notes.md index e2f8cf1f76..7481d8df08 100644 --- a/guides/source/5_2_release_notes.md +++ b/guides/source/5_2_release_notes.md @@ -63,9 +63,20 @@ Railties Please refer to the [Changelog][railties] for detailed changes. -### Removals +### Deprecations -ToDo +* Deprecate `capify!` method in generators and templates. + ([Pull Request](https://github.com/rails/rails/pull/29493)) + +* Deprecated passing the environment's name as a regular argument to the + `rails dbconsole` and `rails console` commands. + ([Pull Request](https://github.com/rails/rails/pull/29358)) + +* Deprecated using subclass of `Rails::Application` to start the Rails server. + ([Pull Request](https://github.com/rails/rails/pull/30127)) + +* Deprecated `after_bundle` callback in Rails plugin templates. + ([Pull Request](https://github.com/rails/rails/pull/29446)) ### Notable changes diff --git a/guides/source/active_storage_overview.md b/guides/source/active_storage_overview.md index 01384e014e..ec90e44358 100644 --- a/guides/source/active_storage_overview.md +++ b/guides/source/active_storage_overview.md @@ -206,8 +206,8 @@ production: NOTE: Files are served from the primary service. -Attach Files to a Model ------------------------ +Attaching Files to Records +-------------------------- ### `has_one_attached` @@ -294,8 +294,8 @@ Call `images.attached?` to determine whether a particular message has any images @message.images.attached? ``` -Remove File Attached to Model ------------------------------ +Removing Files +-------------- To remove an attachment from a model, call `purge` on the attachment. Removal can be done in the background if your application is setup to use Active Job. @@ -309,8 +309,8 @@ user.avatar.purge user.avatar.purge_later ``` -Link to Attachments -------------------- +Linking to Files +---------------- Generate a permanent URL for the blob that points to the application. Upon access, a redirect to the actual service endpoint is returned. This indirection @@ -329,8 +329,8 @@ helper allows you to set the disposition. rails_blob_path(user.avatar, disposition: "attachment") ``` -Transform Images ----------------- +Transforming Images +------------------- To create variation of the image, call `variant` on the Blob. You can pass any [MiniMagick](https://github.com/minimagick/minimagick) @@ -350,8 +350,8 @@ location. <%= image_tag user.avatar.variant(resize: "100x100") %> ``` -Preview Non-image Files ------------------------ +Previewing Files +---------------- Some non-image files can be previewed: that is, they can be presented as images. For example, a video file can be previewed by extracting its first frame. Out of @@ -373,8 +373,8 @@ install them yourself to use the built-in previewers. Before you install and use third-party software, make sure you understand the licensing implications of doing so. -Upload Directly to Service --------------------------- +Direct Uploads +-------------- Active Storage, with its included JavaScript library, supports uploading directly from the client to the cloud. @@ -511,8 +511,8 @@ input[type=file][data-direct-upload-url][disabled] { } ``` -Clean up Stored Files Store During System Tests ------------------------------------------------ +Discarding Files Stored During System Tests +------------------------------------------- System tests clean up test data by rolling back a transaction. Because destroy is never called on an object, the attached files are never cleaned up. If you @@ -550,8 +550,8 @@ config.active_job.queue_adapter = :inline config.active_storage.service = :local_test ``` -Support Additional Cloud Services ---------------------------------- +Implementing Support for Other Cloud Services +--------------------------------------------- If you need to support a cloud service other than these, you will need to implement the Service. Each service extends diff --git a/guides/source/configuring.md b/guides/source/configuring.md index b1e472bb74..1668f9e81a 100644 --- a/guides/source/configuring.md +++ b/guides/source/configuring.md @@ -66,8 +66,6 @@ These configuration methods are to be called on a `Rails::Railtie` object, such * `config.cache_classes` controls whether or not application classes and modules should be reloaded on each request. Defaults to `false` in development mode, and `true` in test and production modes. -* `config.action_view.cache_template_loading` controls whether or not templates should be reloaded on each request. Defaults to whatever is set for `config.cache_classes`. - * `config.beginning_of_week` sets the default beginning of week for the application. Accepts a valid week day symbol (e.g. `:monday`). @@ -538,6 +536,8 @@ Defaults to `'signed cookie'`. `config.action_view` includes a small number of configuration settings: +* `config.action_view.cache_template_loading` controls whether or not templates should be reloaded on each request. Defaults to whatever is set for `config.cache_classes`. + * `config.action_view.field_error_proc` provides an HTML generator for displaying errors that come from Active Model. The default is ```ruby diff --git a/guides/source/engines.md b/guides/source/engines.md index 33694cf76a..8d81296fa5 100644 --- a/guides/source/engines.md +++ b/guides/source/engines.md @@ -1516,12 +1516,12 @@ To hook into the initialization process of one of the following classes use the These are the available configuration hooks. They do not hook into any particular framework, but instead they run in context of the entire application. -| Hook | Use Case | -| ---------------------- | ------------------------------------------------------------------------------------- | -| `before_configuration` | First configurable block to run. Called before any initializers are run. | -| `before_initialize` | Second configurable block to run. Called before frameworks initialize. | -| `before_eager_load` | Third configurable block to run. Does not run if `config.cache_classes` set to false. | -| `after_initialize` | Last configurable block to run. Called after frameworks initialize. | +| Hook | Use Case | +| ---------------------- | ---------------------------------------------------------------------------------- | +| `before_configuration` | First configurable block to run. Called before any initializers are run. | +| `before_initialize` | Second configurable block to run. Called before frameworks initialize. | +| `before_eager_load` | Third configurable block to run. Does not run if `config.eager_load` set to false. | +| `after_initialize` | Last configurable block to run. Called after frameworks initialize. | ### Example |