<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>patorash</author_name>
  <author_url>https://blog.hatena.ne.jp/patorash/</author_url>
  <blog_title>patorashのブログ</blog_title>
  <blog_url>https://patorash.hatenablog.com/</blog_url>
  <categories>
    <anon>Ruby on Rails</anon>
    <anon>Ruby</anon>
  </categories>
  <description>Rails 6.0でとあるアプリを作っているのですが、ActiveStorageを使って画像を添付しています。登録は比較的簡単に行えたのですが、画面から画像のみ削除する方法がいまいちわからなかったので調査しました。 コード（修正前） モデル 複数の画像が添付できるように、has_many_attachedにしています。 class Post &lt; ApplicationRecord has_many_attached :images end ビュー simple_formを使っています。画像はActiveStorageのダイレクトアップロードでアップロードしています。 = simple_form…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fpatorash.hatenablog.com%2Fentry%2F2020%2F12%2F02%2F154636&quot; title=&quot;ActiveStorageで添付した画像をupdateで削除する - patorashのブログ&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url>https://cdn-ak.f.st-hatena.com/images/fotolife/p/patorash/20201202/20201202154337.png</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2020-12-02 15:46:36</published>
  <title>ActiveStorageで添付した画像をupdateで削除する</title>
  <type>rich</type>
  <url>https://patorash.hatenablog.com/entry/2020/12/02/154636</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
