The RoR tutorials posit one model per table for the ORM to work. My DB schema has some 70 tables divided conceptually into 5 groups of functionality (eg, any given table lives in one and only one functional group, and relations between tables of different groups are minimised.) So: should I design a model per conceptual group, or should I simply have 70 Rails models and leave the grouping ‘conceptual’? Thanks!
Share
I cover this in one of my large apps by just making sure that the tables/models are conceptually grouped by name (with almost 1:1 table-model relationship). Example:
That way when I’m using TextMate or whatever, the model files are nicely grouped together by the alpha sort. I have 80 models in this app, and it works well enough to keep things organised.