2016-12-16から1日間の記事一覧
こんなクラス構造 class Hoge < ApplicationRecord has_many :hoge_foos has_many :foos, through: :hoge_foos accepts_nested_attributes_for :hoge_foos end class Foo < ApplicationRecord has_many :hoge_foos has_many :hoges, through: :hoge_foos end…