Colin Law wrote: [...] > if > you have the record for a particular room then value for seat 5 on row 3 > would be referenced by > room.row[3].seat[5].value (assuming zero based indexing, you might > have to > add one to the indexes for real world mapping) > How would this be achieved with the Room and RoomPlan models? > > Colin
Well, another way to do it might be to simply have a 2D array serialized to YAML. That gives the addressability without the join overhead. I tend to agree with you, though: a separate Seat table (probably not a Row table, though) would be good -- it would allow the storage of more than 1 byte of data for each seat... Best, -- Marnen Laibow-Koser http://www.marnen.org [email protected] -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---

