1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/activestorage/app/models/active_storage
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
..
blob Only enqueue analysis jobs when blob is analyzable 2020-01-16 14:14:28 -05:00
attachment.rb touch parent model when an attachment is purged 2020-07-26 12:22:37 -05:00
blob.rb Use Active Record signed IDs in Active Storage 2020-07-04 21:09:00 -04:00
current.rb
filename.rb
preview.rb Active Storage: allow serving files by proxying 2020-05-11 16:21:58 -04:00
variant.rb Fix unintentional method redefinitions 2020-05-14 09:46:16 -04:00
variant_record.rb Track Active Storage variants in the database 2019-12-06 13:26:51 -05:00
variant_with_record.rb Active Storage: allow serving files by proxying 2020-05-11 16:21:58 -04:00
variation.rb Track Active Storage variants in the database 2019-12-06 13:26:51 -05:00