Question on Nested Link & defining relationship

Hi,
I am a newbie to ROR and ActiveScaffold, below please find my DB
schema and the issue that I am seeing with relationship

Table Userviews

userview_id (Prim Key)
drama_id - belongs to table Drama
venue_id - belongs to table Venue

Table Dramas (has many showtimes)

drama_id (Prim Key)
drama_name
.
.
.

Table Venues (has many showtimes)

venue_id (Prim Key)
venue_name
.
.
.

Table Showtimes

show_id (Prim Key)
show_date
drama_id
drama_id - belongs to table Drama
venue_id - belongs to table Venue

The link between Drama & Showtime, Venue & Showtime, Userview & Venue,
Userview & Drama are working fine. The userview table is the one which
define which showtimes can be accessed by a user.

I am having trouble defining the relationship between Userviews &
Showtimes - can anyone check this and let me know how should these two
models be linked such that I can add a nested link from Userview
record to Showtimes based on the drama_id and venue_id for each
record.

Thanks
Ram

Hi Ram

Take a look at activescaffold.
There are some excellent examples on their homepage which will be of
help to you.

Ram wrote:

venue_id (Prim Key)
drama_id
record to Showtimes based on the drama_id and venue_id for each
record.

Thanks
Ram

Why is usersviews linked to drama_id and venue_id instead of just
show_id?


Michael W.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs