How to isolate complex queries in an object oriented fashion
alfredomotta.substack.com
Building complex queries in ruby can make your code quite difficult to read, manage and reuse. In this blog post I'll present a simple method to decorate active record objects to make your queries fun again! The problem Let's assume we are building a system to search talented football players. A player has the following fields:
How to isolate complex queries in an object oriented fashion
How to isolate complex queries in an object…
How to isolate complex queries in an object oriented fashion
Building complex queries in ruby can make your code quite difficult to read, manage and reuse. In this blog post I'll present a simple method to decorate active record objects to make your queries fun again! The problem Let's assume we are building a system to search talented football players. A player has the following fields: