URL parameters are the easiest way to support filtering in a rails app. If you have a
/offersendpoint which returns all offers you might be interested in, then you could filter it by any property by adding query parameters, like for example
/offers?category=tech&status=active&relevance=popular and so forth. Parsing these parameters from inside a Rails controller and passing them to
where method is trivial and works out of the box.
A typical controller would look something like this.
Unfortunately, this only works for exact matches. …