<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>arcright</author_name>
  <author_url>https://blog.hatena.ne.jp/arcright/</author_url>
  <blog_title>chulip.org</blog_title>
  <blog_url>https://chulip.org/</blog_url>
  <categories>
    <anon>Rails</anon>
  </categories>
  <description>ActsAsParanoidを使用してdestoryをコールするとレコードを論理削除してくれるのですが、 CarrierWaveで指定しているafter_destoryのコールバックが実行されてしまい画像が消えてしまいます。 今回は、論理削除する際に画像を残したかったので調べました。githubのissuesに同じような場面についての対応が記載されていたのでこれでOKでした。 https://github.com/carrierwaveuploader/carrierwave/issues/624 ORMはActiveRecordを使っているので下記の部分でコールバックが記述されています。 c…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fchulip.org%2Fentry%2F2013%2F06%2F03%2F154741&quot; title=&quot;ActsAsParanoid+CarrierWave使用時で論理削除した際に画像ファイルを消さないようにする - chulip.org&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></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2013-06-03 15:47:41</published>
  <title>ActsAsParanoid+CarrierWave使用時で論理削除した際に画像ファイルを消さないようにする</title>
  <type>rich</type>
  <url>https://chulip.org/entry/2013/06/03/154741</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
