第一种一对多:has_many:subject belongs_to:user 创建关联子表数据为:user.subject.create(a: 100,b:200) 第二种一对一:has_one:subject belongs_to:user user.create_subject(a: 1, b:2......) 相关文章: 2021-11-23 2022-12-23 2022-12-23 2022-01-13 2022-12-23 2021-09-17 2022-12-23 2021-11-27