I think you're entirely right.  But I struggle to find a meaningful,
yet natural-feeling name.  But besides the name, it still feels a tad
awkward having the join model.  It feels unnecessary, though the
additional attributes require it.

Thanks for the response.

On Mar 22, 3:48 pm, Frederick Cheung <[email protected]>
wrote:
> On Mar 22, 6:08 pm, ericindc <[email protected]> wrote:
>
>
>
> > I think this is right, it just feels odd initially building the middle
> > layer model.  My brain wants to just say Cubicle has_many :printers
> > given that the Printer model is already defined and have Rails just
> > know, sort of like HABTM, to look for the join in the
> > cubicles_printers table.  But I guess the difference comes in with the
> > additional model attributes.
>
> I often find that has many through feels awkward when you haven't
> quite pinned down what the join model is and have to name it something
> like CubiclesPrinters (the classic example is having a join model
> called Subscription between Person and Magazine rather than
> MagazinesPeople). It obviously doesn't change what actually happens
> but finding a good name makes the relationship feel more natural
> rather than a hoop you jump through to make active record happy
>
> Fred
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to