2
有什麼辦法可以在另一個燈具中引用用戶燈具的ID。我有一個messages.yml夾具:Rails Fixtures中的參考用戶
basic:
body: "Hey Barney, wanna go bowling tonight?"
sender: fred
recipient_ids: [users(:barney)]
type: Message
users.yml裏
barney:
first_name: Barney
last_name: Rubble