views:

25

answers:

1

When using relationships in rails are they stored in the database so all foreign keys are stored in the tables and such like or are all relationships controlled via the software?
Thanks in Advance
Dean

+2  A: 

The foreign keys are stored in the tables. The has_many and belongs_to declarations in the models are only there to create the attributes used to access the relationships.

Pär Wieslander