{"type":"rich","blog_title":"dev/mom0tomo","categories":["Ruby on Rails"],"provider_name":"Hatena Blog","version":"1.0","author_name":"mom0tomo","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fmom0tomo.hateblo.jp%2Fentry%2F2018%2F09%2F21%2F172339\" title=\"\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u30e1\u30bd\u30c3\u30c9\u306e\u7406\u89e3 - dev/mom0tomo\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","height":"190","published":"2018-09-21 17:23:39","blog_url":"https://mom0tomo.hateblo.jp/","image_url":null,"provider_url":"https://hatena.blog","url":"https://mom0tomo.hateblo.jp/entry/2018/09/21/172339","author_url":"https://blog.hatena.ne.jp/mom0tomo/","width":"100%","description":"\u305a\u3063\u3068\u3082\u3084\u3063\u3068\u3057\u3066\u305f\u90e8\u5206\u3092\u6574\u7406\u3057\u305f\u3089\u30a2\u30cf\u4f53\u9a13\u304c\u3042\u3063\u305f\u306e\u3067\u307e\u3068\u3081\u308b\u3002 \u3053\u3093\u306a\u30e2\u30c7\u30eb\u304c\u3042\u308b\u5834\u5408\u3002 models/user.rb class User < ApplicationRecord has_many :items end models/item.rb class Item < ApplicationRecord belongs_to :user validates :user_id, presence: true end \u4e2d\u9593\u30c6\u30fc\u30d6\u30eb\u306fLike\u3068\u3059\u308b\u3002 models/like.rb class Like < ApplicationRecord belongs_to :user belong\u2026","title":"\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u30e1\u30bd\u30c3\u30c9\u306e\u7406\u89e3"}