On 21 July 2015 at 10:33, Colin Law <[email protected]> wrote: > On 21 July 2015 at 10:27, Sadaf Noor <[email protected]> wrote: >> >> @colin, certainly I can have a same model car twice :P whatever, it was >> just a made up scenario. > > > If it is the model of car (not an actual car) then you should call the model > CarModel or similar to avoid confusion. In that case I agree with > Elizabeth, use has_many through. Also you might like to consider having a > counter in the join table rather than multiple joins, or perhaps that is > what you have done already.
Or possibly even better User has_many cars CarModel has_many cars So the join model means something in the real world. Colin > > Colin > -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAL%3D0gLvnwUWe72QPrmnAd9YcasefMneh%3D1BepcBAyqn%3DP%3DchtQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.

