3 ms·
I agree. Based on conversations that I've had with rails gurus (I'm in a co-work space with pivotal labs) the essay-like queries are definitely a code smell. I
by mkrecny 16y ago
I agree. Based on conversations that I've had with rails gurus (I'm in a co-work space with pivotal labs) the essay-like queries are definitely a code smell. I think the guy who has laid the relational foundation for the app I'm working on (and taught me all the rails I know to date) has done so in a non-Railsy way.
- pestaa 16y agoYes, and it's not Rails only; every framework that uses Active Record (and that covers the vast majority) requires this sort of approach. "Skinny controller, fat model" is not as easy as it sounds.
- frankus 16y agoNot to sound flippant, but there's your first problem. Rails really doesn't want to be layered over an legacy database schema. Doing so would definitely lead to essay-like queries.