DEV Community

Discussion on: Smarter Rails Services with Active Model Modules

alekseyl profile image

Since all purchasing info stored in DB, this example actually will nicely deconstruct to MVC. Where model is a Purchase object, and controller is a PurchasesController.

So at the end you got yourself the good old MVC made in a good old Rails way.

Occam's razor is to the rescue, when you want to add some new essense try the old ones thoroughly.

It may work as an example of ActiveModel use, but it's a purely theoretic example.