Re:On logic in a Rails app, revisited 6 years later
by knubie on Saturday May 18, 2019 @06:46PM
(#19950137)
The whole point of the Active Record pattern is that domain objects double as DAOs.
Re:On logic in a Rails app, revisited 6 years later
by nullwasamistake on Saturday May 18, 2019 @07:18PM
(#19950264)
I agree. Not a fan of Martin Fowler for many reasons but a good ORM is your DAO. Otherwise there's not much a point
In other words, there should be another layer in-between your DAO (data access object, ORM, etc) and controller. The "Model" in MVC was never meant to represent a single row of a database in object form. A Model should have a DAO but a Model should not be a DAO.