instance method touch_attachments

Ruby on Rails 8.1.2

Since v7.2.3 Private

Available in: v7.2.3 v8.0.4 v8.1.2

Signature

touch_attachments()

No documentation comment.

Source
# File activestorage/app/models/active_storage/blob.rb, line 363
    def touch_attachments
      attachments.then do |relation|
        if ActiveStorage.touch_attachment_records
          relation.includes(:record)
        else
          relation
        end
      end.each do |attachment|
        attachment.touch
      end
    end

Defined in activestorage/app/models/active_storage/blob.rb line 363 · View on GitHub · Improve this page · Find usages on GitHub

Defined in ActiveStorage::Blob

Type at least 2 characters to search.

↑↓ navigate · open · esc close