Patch #25570 » 0001-adds-params-query-type-check.patch
app/models/query.rb | ||
---|---|---|
374 | 374 |
add_short_filter(field, params[field]) if params[field] |
375 | 375 |
end |
376 | 376 |
end |
377 |
self.group_by = params[:group_by] || (params[:query] && params[:query][:group_by]) |
|
378 |
self.column_names = params[:c] || (params[:query] && params[:query][:column_names]) |
|
379 |
self.totalable_names = params[:t] || (params[:query] && params[:query][:totalable_names]) |
|
380 |
self.sort_criteria = params[:sort] || (params[:query] && params[:query][:sort_criteria]) |
|
377 |
query_params = params[:query].is_a?(ActionController::Parameters) ? params[:query] : {} |
|
378 |
self.group_by = params[:group_by] || query_params[:group_by] |
|
379 |
self.column_names = params[:c] || query_params[:column_names] |
|
380 |
self.totalable_names = params[:t] || query_params[:totalable_names] |
|
381 |
self.sort_criteria = params[:sort] || query_params[:sort_criteria] |
|
381 | 382 |
self |
382 | 383 |
end |
383 | 384 |