views:

18

answers:

1

I'd like to run the rails "generate" script and create a model that belongs two other models. Is there a way that I can do this?

+1  A: 

Figured it out. If you have a model named "child" that belongs to a model named "mom" and a model named "dad", the syntax is:

rails generate model child mom:reference dad:reference
Drew Johnson