module BlazerJsonAPI
Taken from: github.com/ankane/blazer/blob/ac7e02e0fe19ee6c0bc8c7f3ba87be0d260f8255/app/controllers/blazer/base_controller.rb#L35 Necessary for processing any query variables safely Refactored to avoid rubocop breaches
Converts a blazer query result table into nested JSON Used the convention of a double underscore in the column header to denote a parent key or nesting e.g. { ‘parent__child’: ‘1’ } becomes { ‘parent’: { ‘child’: 1 }}
Constants
- VERSION