From 2cd8ac1b68ba04ca12a816c8113271017b3c43c4 Mon Sep 17 00:00:00 2001 From: George Claghorn Date: Thu, 31 Aug 2017 20:10:56 -0400 Subject: Have attachments touch their records --- activestorage/app/models/active_storage/attachment.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activestorage/app') diff --git a/activestorage/app/models/active_storage/attachment.rb b/activestorage/app/models/active_storage/attachment.rb index 2a1c20b7db..29226e8ee9 100644 --- a/activestorage/app/models/active_storage/attachment.rb +++ b/activestorage/app/models/active_storage/attachment.rb @@ -9,7 +9,7 @@ require "active_support/core_ext/module/delegation" class ActiveStorage::Attachment < ActiveRecord::Base self.table_name = "active_storage_attachments" - belongs_to :record, polymorphic: true + belongs_to :record, polymorphic: true, touch: true belongs_to :blob, class_name: "ActiveStorage::Blob" delegate_missing_to :blob -- cgit v1.2.3