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
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
..
assets/javascripts Defaults content_type to application/octet-stream 2020-01-07 10:30:56 -08:00
controllers Disable template digesting for Active Storage controllers 2020-07-05 10:51:08 -04:00
javascript/activestorage Defaults content_type to application/octet-stream 2020-01-07 10:30:56 -08:00
jobs/active_storage Discard ActiveStorage::AnalyzeJobs on ActiveRecord::RecordNotFound 2019-09-28 10:28:21 -04:00
models/active_storage touch parent model when an attachment is purged 2020-07-26 12:22:37 -05:00