{"author_name":"yoshitaku_jp","type":"rich","height":"190","blog_url":"https://yoshitaku-jp.hatenablog.com/","provider_name":"Hatena Blog","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fyoshitaku-jp.hatenablog.com%2Fentry%2F2019%2F03%2F14%2F173000\" title=\"Rails\u306e\u4e2d\u9593\u30c6\u30fc\u30d6\u30eb\u3092\u7d4c\u7531\u3057\u3066\u30c7\u30fc\u30bf\u53d6\u5f97\u304c\u3067\u304d\u306a\u304b\u3063\u305f\u30a8\u30e9\u30fc - \u3088\u3057\u305f\u304f blog\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","description":"tl;dr has_many\u3092\u4f7f\u3063\u3066\u30c7\u30fc\u30bf\u3092\u53d6\u5f97\u3057\u305f\u304b\u3063\u305f has_many\u306b\u306f\u8a18\u8ff0\u3059\u308b\u9806\u756a\u304c\u3042\u308b \u30a8\u30e9\u30fc\u5185\u5bb9 Cannot have a has_many :through association 'Hoge#fuga' which goes through 'Hoge#hoge_fuga' before the through association is defined. \u767a\u751f\u306e\u72b6\u6cc1 \u30e6\u30fc\u30b6\u304c\u6301\u3063\u3066\u3044\u308b\u672c\u306e\u4e00\u89a7\u3092\u4e2d\u9593\u30c6\u30fc\u30d6\u30eb\u3092\u7d4c\u7531\u3057\u3066\u53d6\u5f97\u3057\u305f\u304b\u3063\u305f\u3002 \u4e0b\u8a18\u306e\u30b3\u30fc\u30c9\u3092\u66f8\u3044\u3066\u3044\u305f\u3002 class User < ApplicationRecord has_many :books, through\u2026","url":"https://yoshitaku-jp.hatenablog.com/entry/2019/03/14/173000","author_url":"https://blog.hatena.ne.jp/yoshitaku_jp/","image_url":null,"categories":["\u30a8\u30e9\u30fc","Rails","Ruby"],"blog_title":"\u3088\u3057\u305f\u304f blog","provider_url":"https://hatena.blog","version":"1.0","width":"100%","title":"Rails\u306e\u4e2d\u9593\u30c6\u30fc\u30d6\u30eb\u3092\u7d4c\u7531\u3057\u3066\u30c7\u30fc\u30bf\u53d6\u5f97\u304c\u3067\u304d\u306a\u304b\u3063\u305f\u30a8\u30e9\u30fc","published":"2019-03-14 17:30:00"}