Forum: Ruby on Rails A simple, short model naming question.

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Alder G. (Guest)
on 2006-05-16 01:11
(Received via mailing list)
I have a join-model providing "has_many :through" association between
two models, User and Page [1].

I'm wondering if I may name that model UserPage instead of PagesUsers.
Of course, if the association was a regular habtm, the association
table should have been named "pages_users" by default. But in that
case, the table (and therefore its name) would only be used internally
by Rails. Whereas in the join-model case, we're creating a full model,
which would be exposed as a class. So I think I prefer UserPage that -
as a class/object - is more intuitive and meaningful than PagesUsers.

Any reason I should use PagesUsers nonetheless?


[1] as explained in
This topic is locked and can not be replied to.