<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>mom0tomo</author_name>
  <author_url>https://blog.hatena.ne.jp/mom0tomo/</author_url>
  <blog_title>dev/mom0tomo</blog_title>
  <blog_url>https://mom0tomo.hateblo.jp/</blog_url>
  <categories>
    <anon>Ruby on Rails</anon>
  </categories>
  <description>ずっともやっとしてた部分を整理したらアハ体験があったのでまとめる。 こんなモデルがある場合。 models/user.rb class User &lt; ApplicationRecord has_many :items end models/item.rb class Item &lt; ApplicationRecord belongs_to :user validates :user_id, presence: true end 中間テーブルはLikeとする。 models/like.rb class Like &lt; ApplicationRecord belongs_to :user belong…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fmom0tomo.hateblo.jp%2Fentry%2F2018%2F09%2F21%2F172339&quot; title=&quot;インスタンスメソッドの理解 - dev/mom0tomo&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>2018-09-21 17:23:39</published>
  <title>インスタンスメソッドの理解</title>
  <type>rich</type>
  <url>https://mom0tomo.hateblo.jp/entry/2018/09/21/172339</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
