<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>kuronekopunk</author_name>
  <author_url>https://blog.hatena.ne.jp/kuronekopunk/</author_url>
  <blog_title>ノンカフェインであなたにやさしい</blog_title>
  <blog_url>https://akinobu.net/</blog_url>
  <categories>
    <anon>Ruby on Rails</anon>
  </categories>
  <description>こんな関連付けのモデルがあったとして class Atable &lt; ApplicationRecord has_one :btable has_one :ctable end class Btable &lt; ApplicationRecord belongs_to :atable end class Ctable &lt; ApplicationRecord belongs_to :atable end bからcを呼び出すのに Btable.find(1).atable.ctable としなきゃいけないのはだるい btables.atable_id = ctables.atable_id の条件で関連…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fakinobu.net%2Fentry%2F2017%2F06%2F13%2F171018&quot; title=&quot;Railsでprimary_keyとforeign_keyの両方を指定して主キーではないカラムで関連付けする - ノンカフェインであなたにやさしい&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>2017-06-13 17:10:18</published>
  <title>Railsでprimary_keyとforeign_keyの両方を指定して主キーではないカラムで関連付けする</title>
  <type>rich</type>
  <url>https://akinobu.net/entry/2017/06/13/171018</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
