Although the namespace has its advantages, it requires the addition of exceptions in all models. Foo :: Bar assumes the name of the bars table and is similar to bar_id for associations, whereas you can use foo_bars and foo_bar_id .
If you are really serious about this, you can see if there is an add-in that fixes this for you, or implement your own extension that does.
The only time I used namespaces is add-ons that should be used in third-party applications where I don't want to require model names at the root level, as that would be annoying. Additional efforts in this case are worth it.
If it bothers you to see 100+ model files without any grouping, you will probably be just as annoyed to see more than 100 tables without grouping, and, as a rule, you cannot fix something.
Controllers can be grouped quite naturally, but models are not so easy to place, at least not with ActiveRecord.
tadman
source share