views:

221

answers:

1

Hay guys, I'm a novice to intermediate RoR programmer. However, I'm not too good on setting up relational database's so i need a hand.

Basically my app is a book club. A user signs up, the user creates a book club based on a book. Other users joins this club and discusses it (like a forum).

I have written a english description of the schema.

User has many clubs

Club has one book, has many users, has many threads

Book has many clubs, belongs to a club

Threads has many replies, belongs to a club

Reply belongs to a thread

I need some help with the migrations for this, aswell as the models.

Any help would be great.

Thanks!

+3  A: 

This is one of the best descriptions of Active Record associations I've seen:

http://guides.rubyonrails.org/association_basics.html

Go through these and you'll see how to setup your models and migrations.

mando
Thanks, very descriptive information here.
dotty