{"provider_url":"https://hatena.blog","url":"https://omdwn.hatenablog.com/entry/2020/07/05/155537","height":"190","author_url":"https://blog.hatena.ne.jp/omdwn/","blog_title":"\u30a4\u30f3\u30c9\u30ab\u30ec\u30fc\u30d5\u30a1\u30f3\u30af\u30e9\u30d6","description":"\u4e00\u4eba\u306e\u30e6\u30fc\u30b6\u306f\u4e00\u3064\u306e\u30d7\u30ed\u30d5\u30a3\u30fc\u30eb\u3092\u6709\u3059\u308b\u3001\u3068\u3044\u3046\u3088\u3046\u306aAssociation\u3092\u3064\u304f\u3063\u3066\u307f\u308b 1:1\u3067\u3059 \u524d\u63d0 \u4ee5\u4e0b\u306e\u3088\u3046\u306a\u69cb\u6210\u3092\u76ee\u6307\u3059 User name profile_id Profile text \u30e2\u30c7\u30eb\u306f\u3053\u3046\u306a\u308b class User < ApplicationRecord belongs_to :profile end class Profile < ApplicationRecord end \u3053\u3093\u306a\u611f\u3058\u306e\u3053\u3068\u3092\u3057\u305f\u3044 p = Profile.new(text: 'hello') p.save! u = User.new(name: 'test user', profile: p) \u2026","published":"2020-07-05 15:55:37","type":"rich","image_url":null,"categories":["Rails","Ruby"],"width":"100%","author_name":"omdwn","version":"1.0","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fomdwn.hatenablog.com%2Fentry%2F2020%2F07%2F05%2F155537\" title=\"\u3010Rails\u3011association\u3092\u5f35\u3063\u305fModel\u3092\u751f\u6210\u3059\u308b\u6642\u306emigration\u306e\u8a18\u8ff0 - \u30a4\u30f3\u30c9\u30ab\u30ec\u30fc\u30d5\u30a1\u30f3\u30af\u30e9\u30d6\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","title":"\u3010Rails\u3011association\u3092\u5f35\u3063\u305fModel\u3092\u751f\u6210\u3059\u308b\u6642\u306emigration\u306e\u8a18\u8ff0","provider_name":"Hatena Blog","blog_url":"https://omdwn.hatenablog.com/"}