DEV Community

Discussion on: Business logic in Rails with operators

Collapse
jaredcwhite profile image
Jared White

Everyone's entitled to their architecture, but I believe models are precisely where you do want business logic. Jason Swett and I go into this in-depth on his podcast: codewithjason.com/code-with-jason-...

It's talking about service objects more particularly and why we don't care for them, but it's thinking to apply here as well. You can obviously create either concerns or POROs inside app/models, and in turn utilize those from within your ActiveRecord models. But in my opinion using AR models themselves as the primary API for your domain layer whenever possible is a winning strategy.

Thread Thread
citronak profile image
Petr Hlavicka Author

Thanks, Jared, I will definitely listen the podcast.