<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>omdwn</author_name>
  <author_url>https://blog.hatena.ne.jp/omdwn/</author_url>
  <blog_title>インドカレーファンクラブ</blog_title>
  <blog_url>https://omdwn.hatenablog.com/</blog_url>
  <categories>
    <anon>Rails</anon>
    <anon>Ruby</anon>
  </categories>
  <description>一人のユーザは一つのプロフィールを有する、というようなAssociationをつくってみる 1:1です 前提 以下のような構成を目指す User name profile_id Profile text モデルはこうなる class User &lt; ApplicationRecord belongs_to :profile end class Profile &lt; ApplicationRecord end こんな感じのことをしたい p = Profile.new(text: 'hello') p.save! u = User.new(name: 'test user', profile: p) …</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fomdwn.hatenablog.com%2Fentry%2F2020%2F07%2F05%2F155537&quot; title=&quot;【Rails】associationを張ったModelを生成する時のmigrationの記述 - インドカレーファンクラブ&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>2020-07-05 15:55:37</published>
  <title>【Rails】associationを張ったModelを生成する時のmigrationの記述</title>
  <type>rich</type>
  <url>https://omdwn.hatenablog.com/entry/2020/07/05/155537</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
