<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>E_Mattsan</author_name>
  <author_url>https://blog.hatena.ne.jp/E_Mattsan/</author_url>
  <blog_title>エンジニアのソフトウェア的愛情</blog_title>
  <blog_url>https://blog.emattsan.org/</blog_url>
  <categories>
    <anon>Ruby</anon>
    <anon>Rails</anon>
    <anon>めも</anon>
  </categories>
  <description>つまりこうゆうことです。 探した範囲でははっきりとした情報が見つからなかったので、めも。 このようなモデルがあるばあい、 class Article &lt; ApplicationRecord has_one_attached :image end たとえばこのようにすることで storage にデータを格納できますが、Rails は元のデータとは別のオブジェクトを storage に生成します。 Article.find(id).image(filename: image_filename, io: File.read(image_filename)) worker が生成したデータの出力先を制…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fblog.emattsan.org%2Fentry%2F2019%2F04%2F21%2F113326&quot; title=&quot;外部で生成したデータをActive Storageでattachしたいとき - エンジニアのソフトウェア的愛情&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/E/E_Mattsan/20190421/20190421111221.png</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2019-04-21 11:33:26</published>
  <title>外部で生成したデータをActive Storageでattachしたいとき</title>
  <type>rich</type>
  <url>https://blog.emattsan.org/entry/2019/04/21/113326</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
