From 45ed61ac4731eb91f39d3762889dce0da899af45 Mon Sep 17 00:00:00 2001 From: George Claghorn Date: Tue, 3 Oct 2017 08:27:21 -0500 Subject: Associate blobs with their attachments --- activestorage/app/models/active_storage/blob.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'activestorage/app') diff --git a/activestorage/app/models/active_storage/blob.rb b/activestorage/app/models/active_storage/blob.rb index 7477b09d09..ff785d4f61 100644 --- a/activestorage/app/models/active_storage/blob.rb +++ b/activestorage/app/models/active_storage/blob.rb @@ -23,6 +23,8 @@ class ActiveStorage::Blob < ActiveRecord::Base class_attribute :service + has_many :attachments + has_one_attached :preview_image class << self -- cgit v1.2.3