diff options
author | George Claghorn <george@basecamp.com> | 2018-07-17 09:33:28 -0400 |
---|---|---|
committer | George Claghorn <george@basecamp.com> | 2018-07-17 09:33:48 -0400 |
commit | e13e16f5adf3221f4a95e7d105efb2d5e56c0b53 (patch) | |
tree | d9565b52a8b6afcaf31d8e51802c433a686cb66e /activestorage/lib/active_storage | |
parent | 379d98dcd40f28fd959f42958d662b5416171eea (diff) | |
download | rails-e13e16f5adf3221f4a95e7d105efb2d5e56c0b53.tar.gz rails-e13e16f5adf3221f4a95e7d105efb2d5e56c0b53.tar.bz2 rails-e13e16f5adf3221f4a95e7d105efb2d5e56c0b53.zip |
Fix replacing many attachments via assign and attach
Diffstat (limited to 'activestorage/lib/active_storage')
-rw-r--r-- | activestorage/lib/active_storage/attached/changes/delete_many.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/activestorage/lib/active_storage/attached/changes/delete_many.rb b/activestorage/lib/active_storage/attached/changes/delete_many.rb index 5c7fe385de..6cbd1158dc 100644 --- a/activestorage/lib/active_storage/attached/changes/delete_many.rb +++ b/activestorage/lib/active_storage/attached/changes/delete_many.rb @@ -12,6 +12,10 @@ module ActiveStorage ActiveStorage::Attachment.none end + def blobs + ActiveStorage::Blob.none + end + def save record.public_send("#{name}_attachments=", []) end |