2020-07-05から1日間の記事一覧
一人のユーザは一つのプロフィールを有する、というようなAssociationをつくってみる 1:1です 前提 以下のような構成を目指す User name profile_id Profile text モデルはこうなる class User < ApplicationRecord belongs_to :profile end class Profile <…
一人のユーザは一つのプロフィールを有する、というようなAssociationをつくってみる 1:1です 前提 以下のような構成を目指す User name profile_id Profile text モデルはこうなる class User < ApplicationRecord belongs_to :profile end class Profile <…