I'm trying to find the best way to associate notes to many models. I have a table called notes, and the tables I wanted associated to those notes are: players teams parents To accomplish it, would my notes database column just have the following: Note --------- body:string player_id:integer team_id:integer parent_id:integer That does seem messy, so I don't know if that's correct. Is there a better approach to associate notes to many models?
on 2008-10-16 02:30
on 2008-10-16 03:04
On Oct 16, 8:30 am, Bob Sanders <rails-mailing-l...@andreas-s.net> wrote: > > Posted viahttp://www.ruby-forum.com/. Does a note need to be associated with only one of the 3 tables for each instance? If yes, take a look at has_many_polymorphs. http://m.onkey.org/2007/8/14/excuse-me-wtf-is-polymorphs http://blog.evanweaver.com/files/doc/fauna/has_man...