Adrien Nom wrote: > Hi, > > I need to do a polymorphic association but i want to save the field > XXX_type in an other table, like that :
[...] > Table: ELECTED > - id > - user_id > - mandate_id > - place_id -> id of CITY.id or STATES.id depending on > MANDATES.place_type related by mandate_id > > How can I do that with rails ?? Why do you want to do it that way? It seems like extra work for no good reason. Worse, it's poor DB design. Since place_id and place_type are so intimately related, they belong in the same table. In this case that probably means that place_id should go in mandates. [...] > Adrien 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 -~----------~----~----~----~------~----~------~--~---

