Equipment.create(name: "Room to run")
Equipment.create(name: "Pull-up bar")
Workout.create(
description: "Do 100 pull-ups then run 5km",
:equipment => Equipment.where(:name => 'Pull-up bar'))
设备和锻炼具有 HABTM 关系。上面的种子代码有效,但我怎样才能在第一个设备关联的同时分配第二个设备关联?