Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ci skip] ActiveStorage guides don't recommend using a deprecated config #48784

Merged
merged 1 commit into from Jul 21, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 2 additions & 3 deletions guides/source/active_storage_overview.md
Expand Up @@ -575,10 +575,9 @@ file’s content type automatically, it defaults to application/octet-stream.
### Replacing vs Adding Attachments

By default in Rails, attaching files to a `has_many_attached` association will replace
any existing attachments. To instead add new attachments while retaining existing
ones, set `Rails.application.config.replace_on_assign_to_many` to false.
any existing attachments.

Alternatively, use hidden form fields with the [`signed_id`][ActiveStorage::Blob#signed_id]
To keep existing attachments, you can use hidden form fields with the [`signed_id`][ActiveStorage::Blob#signed_id]
of each attached file:

```erb
Expand Down