title: Checking if image is ".attached?" when attaching same image to multiple models fails
body: <p>I'm trying to attach the same active storage image to two different models, reason being, I don't want two copies of the files stored, and I want to optimize DB queries so that I can just query "activity" to show the images, and not have to query both activity and posts.
  The image attaches, but when i use the command.attach? it returns false for the activities. But it shows it has an image when I do @activity.image</p>
  
  <p>Using Active Storage, here is my code</p>
  
  <pre><code>    @post.image.attach(io: File.open(image_file), filename: file_name)
      @activity.image.attach(@post.image)
  </code></pre>
  
  <p>In the console:</p>
  
  <pre><code>    &gt;@post.image.attached?
  =&gt; **true**
  
      &gt;@post.image
  =&gt; #&lt;ActiveStorage::Attached::One:0x000055d2dd844aa8 @name="image", @record=...
  
      &gt;@activity.image
  =&gt; #&lt;ActiveStorage::Attached::One:0x000055d2dd8529f0 @name="image", @record=...    
  
      &gt;@activity.image.attached?
  =&gt; **false**
  </code></pre>
  
  <p>In the views:</p>
  
  <pre><code>&lt;%= image_tag @post.image %&gt;  **IMAGE SHOWS UP**
  &lt;%= image_tag @activity.image %&gt;  **NO IMAGE**
  </code></pre>