Tutorial for creating rail and scaffold models with foreign key relationships


Where can I find a good Rails newbie-friendly reference about generating rails models with foreign key relationships?

I've found some pages indicating that you should add has_many and belongs_to to the relevant models to specify these relationships, but haven't seen any instructions for getting the scaffolds to generate the correct controller and view code that would reflect these relationships.


and check Chap 11 and 12 for Rails 3 and Rails 3.2 I hope you like those chaps and it is very nice concept for foreign key relationships