On Jul 15, 2:03 am, Heinz Strunk <[email protected]> wrote: > What do you guys think of: > has_and_belongs_to_many :parents, :class_name => "Menu", > :association_foreign_key => "parent_id", :join_table => "menus_parents"
I think it's astoundingly bad UI to have identical options in more than one place - but that's just my opinion. Unless your Menu model is exceptionally complicated, is it *really* worth the significant boost in both code and SQL complexity just to support this (hopefully uncommon) edge case? DRY is great, but there's a point of diminishing (if not negative) returns... As to the technical side of the question, you'd want to use a real join model (with has_many :through). How else could you keep track of the position of the repeated items in each of the parent menus? --Matt Jones -- 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.

