rails model has_many :through associations

后端 未结 2 1353
野性不改
野性不改 2021-01-05 05:34

I am trying to get my relationships worked out but I am having trouble using the associations.

So I have three models Workout, Exercise and

2条回答
  •  轮回少年
    2021-01-05 05:56

    Your code looks OK. Bug maybe has_and_belongs_to_many is a better choice. See Choosing Between has_many :through and has_and_belongs_to_many

提交回复
热议问题