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

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
B780ee0ee1480454a85df58536702f63?d=identicon&s=25 Alder Green (Guest)
on 2006-05-15 23: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?

--
-Alder

[1] as explained in
http://blog.hasmanythrough.com/articles/2006/04/20...
This topic is locked and can not be replied to.