Looking for some guidance on how to accomplish the following... Assume a ticket management system being developed, with a main Ticket model. A Ticket has: a caller an assigned resource a closer a last-updater an escalation manager one or more copy-to's All of these are just different people from my users table. Any one person in the user table could be any one of these on one or more tickets. That is, I could be the caller on one or more tickets, or the assigned resource or the copy-to. The same person could be one or more of these on any one ticket. That is, I could be both the assigned resource and the closer on a particular ticket. I'm not sure how to do this within Rails, without creating multiple tables and/or views. It's not really polymorphic, as I understand it. It's not really STI, as I that. It's kind of a hybrid. Can it be done just by setting up the right associations with appropriate parms (like :source, :foreign_key, :class_name)? Just need to be set in the right direction and given a good push... Thanks. c.
on 2007-01-30 16:39
on 2007-01-30 16:54
This thread will show you how to create multiple foreign keys in your model: http://www.ruby-forum.com/topic/95943
on 2007-01-30 17:26
Mick Sharpe wrote: > This thread will show you how to create multiple foreign keys in your > model: > > http://www.ruby-forum.com/topic/95943 Thanks a bunch. And, um ... wow, sorry - you'd think I would have seen that post this am. cb.
on 2007-01-30 17:29
da nada ;-) Mick