def ql
      returns = params[:batch].to_unsafe_h.map do |batch_resource, query|
        batch_resource = batch_resource.to_s
        batch_module = batch_resource.underscore
        resource = batch_resource.classify.constantize
        authorize_for(action: :index,
                      resource: batch_module.singularize.to_sym)
        records = resource.ransack(parsed_query(query)).result.as_json
        [batch_module, records]
      end.to_h
      render json: returns
    end
def ql
      returns = params[:batch].to_unsafe_h.map do |batch_resource, query|
        batch_resource = batch_resource.to_s
        batch_module = batch_resource.underscore
        resource = batch_resource.classify.constantize
        authorize_for(action: :index,
                      resource: batch_module.singularize.to_sym)
        records = resource.ransack(parsed_query(query)).result.as_json
        [batch_module, records]
      end.to_h
      render json: returns
    end
GET /ql
 This action takes a JSON as argument with models as keys and ransack
 conditions as values, returning a custom indexed payload.
 WARNING: This action is not paginated, so thread carefully when using it.