Hi all! In my application I'm trying to create a model (Groups), which will allow me to save groups of objects from various tables under a common name. For example, one record in this table could refer to a group of users. Another could refer to a group of photos. How should I do this? When I use has_many_through I have to specify the group_id as well as the id for whatever object I am referring to. But if the other id could refer to a photo, or a user, or another model, how do I setup this kind of inheritance? Do I have multiple foreign key fields in the table that links the two together? EX: group_id, user_id, photo_id etc. and leave the fields not being used blank. Or does this cause an error because they are indexes?
Best, Ben -- 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 -~----------~----~----~----~------~----~------~--~---

