1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/activestorage/test/models
Victor Perez Rodriguez 396b43a99d touch parent model when an attachment is purged
Currently `delete` is used on the `purge` and `purge_later` methods,
that prevent any callbacks to be triggered which causes the parent
model to not be updated when an attachment is purged. This behaviour
cause issues on some caching strategies as reported here: https://github.com/rails/rails/issues/39858

Changes:

* Add `record&.touch` on `attachment#purge`
* Add `record&.touch` on `attachment#purge_later`
* Remove extra blank line on attachment.rb
* Add tests which are failing before this change and pass after the change
2020-07-26 12:22:37 -05:00
..
attached touch parent model when an attachment is purged 2020-07-26 12:22:37 -05:00
attachment_test.rb Use Active Record signed IDs in Active Storage 2020-07-04 21:09:00 -04:00
blob_test.rb Deprecate starts_with? and ends_with? for String core extensions 2020-05-05 15:51:24 +09:00
filename_test.rb
presence_validation_test.rb
preview_test.rb Store previews in the same service as the original blob 2019-12-20 15:06:03 -05:00
reflection_test.rb Allow configure services for individual attachments 2019-10-01 21:24:05 +03:00
representation_test.rb
variant_test.rb Use DiskController for both public and private files 2019-12-06 16:02:16 -05:00
variant_with_record_test.rb Make sure variant is created on the same service 2019-12-06 22:02:07 -05:00