again. There are many OO patterns out there that we are still missing in the Rails projects. Today, we will implement a Filterer pattern to break those searches in smaller parts.
to find something. `Index` actions it’s most of the time the natural place to “grow” a filterer. Tests are easier when you have an specialized class than trying to test everything from a controller.
having multiple ways of doing a common thing. Projects/teams can have different ways to organize the code. Most of the time there's a search or a filter already in place for a given entity or set of entities.