<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>zariganitosh</author_name>
  <author_url>https://blog.hatena.ne.jp/zariganitosh/</author_url>
  <blog_title>ザリガニが見ていた...。</blog_title>
  <blog_url>https://zariganitosh.hatenablog.jp/</blog_url>
  <categories>
    <anon>Ruby on Rails</anon>
  </categories>
  <description>前回思い浮かんだ疑問や問題に、できるところから自分なりに対応してみた。 入力されている明細のみ保存する Journalモデルに入力チェックのメソッドinput?を追加してみた。 ついでに、インデックス値の先頭に「j」を付加して、idと重複する可能性を無くしておいた。 # モデル: app/models/journal.rb class Journal &lt; ActiveRecord::Base belongs_to :slip validates_presence_of :comment, :yen def initialize(*attr) super # 以下の形式でユニークなインデックス値…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fzariganitosh.hatenablog.jp%2Fentry%2F20080105%2F1199495199&quot; title=&quot;改良中...複数のモデルを同時に保存する - ザリガニが見ていた...。&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/z/zariganitosh/20080105/20080105095826.png</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2008-01-05 10:06:39</published>
  <title>改良中...複数のモデルを同時に保存する</title>
  <type>rich</type>
  <url>https://zariganitosh.hatenablog.jp/entry/20080105/1199495199</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
