Use Rails 6 attachments defaults in Active Storage
In Active Storage 5.2 there was an unexpected behavior: assigning a collection appended records to the existing collection, instead of replacing them as it's done in Active Record associations. It doesn't really affect us, though, since we don't use `has_many_attached` anywhere.
This commit is contained in:
@@ -28,7 +28,7 @@ Rails.application.config.active_job.return_false_on_aborted_enqueue = true
|
|||||||
|
|
||||||
# When assigning to a collection of attachments declared via `has_many_attached`, replace existing
|
# When assigning to a collection of attachments declared via `has_many_attached`, replace existing
|
||||||
# attachments instead of appending. Use #attach to add new attachments without replacing existing ones.
|
# attachments instead of appending. Use #attach to add new attachments without replacing existing ones.
|
||||||
# Rails.application.config.active_storage.replace_on_assign_to_many = true
|
Rails.application.config.active_storage.replace_on_assign_to_many = true
|
||||||
|
|
||||||
# Use ActionMailer::MailDeliveryJob for sending parameterized and normal mail.
|
# Use ActionMailer::MailDeliveryJob for sending parameterized and normal mail.
|
||||||
#
|
#
|
||||||
|
|||||||
Reference in New Issue
Block a user