<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>shinkufencer</author_name>
  <author_url>https://blog.hatena.ne.jp/shinkufencer/</author_url>
  <blog_title>コード日進月歩</blog_title>
  <blog_url>https://shinkufencer.hateblo.jp/</blog_url>
  <categories>
    <anon>Rails</anon>
    <anon>Tips</anon>
  </categories>
  <description>簡易な記録テーブルなどで、時刻などを更新をしたいときの豆知識 環境 $ rails -v Rails 7.1.2 やり方 該当レコードで .touch をすると自動的に保存がされる 例 book.updated_at # Thu, 01 Feb 2024 14:37:18.696490000 UTC +00:00 このようなレコードに .touch をすると現在時刻が入る。 book.touch # true book.updated_at # Thu, 01 Feb 2024 14:37:37.490409000 UTC +00:00 応用編 任意の時間を設定することもできる。 book.t…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fshinkufencer.hateblo.jp%2Fentry%2F2024%2F02%2F24%2F000000&quot; title=&quot;ActiveRecordの内容に変化はないが、updated_atだけ更新したい場合はtouchを使用する - コード日進月歩&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>2024-02-24 00:00:00</published>
  <title>ActiveRecordの内容に変化はないが、updated_atだけ更新したい場合はtouchを使用する</title>
  <type>rich</type>
  <url>https://shinkufencer.hateblo.jp/entry/2024/02/24/000000</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
