Results 1 to 17 of 17
Jun 23, 2006, 23:48 #1
Rails - accessing more data in join tables
I'm working with a database that holds race schedule info, including results.
Each race has many drivers, and each driver can be in many races. Pretty straight forward.
So we have a races table, a drivers table, and a drivers_races join table.
For each race & driver pair, there exists unique data, such as starting position, end position, etc.
It makes sense to me to put those into the join table like so:
Any advice on working with this table? I could create a model for it maybe, but I am not familiar enough with RoR yet to really know how to access it efficiently. I'd like to avoid using raw SQL if possible.