I wanted to gather some feedback from people about nested models and
the assumptions that they make about the underlying database
structure. As I see it, the primary function of nesting model classes
inside of modules is to provide a namespacing mechanism. Given that a
model class called Admin::Foo and User::Foo will both use the table
name 'foos' by default this namespacing seems to be incomplete. You
could always specify a different table name for each class but this is
a pretty manual approach to namespacing. The only feasible solution I
could come up with is to have a class named Admin::Foo assume a
default table name of admin__foos. The double _ would prevent a
collision with a class named AdminFoo and seems to me the most logical
way to differentiate between the two.
Just wanted to throw the topic out there, see what people thought,
etc. I would definitely consider submitting a patch if it seems like
there is some interest...