第一种一对多: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-04 2021-11-23 2021-08-02 2021-10-02 2021-11-02 2021-12-07 2021-08-02 2021-11-27