2 ms·
The goal of this project is for easy model accession / querying via JavaScript or some other external interface. The most powerful part of this implementation,
by keithwhor 12y ago
The goal of this project is for easy model accession / querying via JavaScript or some other external interface. The most powerful part of this implementation, I would argue, is the filtering of endpoint data via request.query_parameters.
This allows for "people/?age__gte=25" and other simple logic filters that can be communicated over the HTTP request, and is standard across all models and endpoints.
- jerhinesmith 12y agoCouldn't you easily accomplish the same thing via the ransack gem? https://github.com/activerecord-hackery/ransack/wiki/Basic-Searching https://github.com/activerecord-hackery/ransack/wiki/Basic-S...
- keithwhor 12y agoYes, I'm sure you could --- in combination with ActiveModel::Serializer. Our approach was meant to attack a combination of common, specific problems (standardized way to output API data, queryable with logic via HTTP parameters, a single SQL query to collect and aggregate data) with a dead simple, low-overhead solution.