|
|
@ -70,6 +70,7 @@ class CostReportsController < ApplicationController |
|
|
|
## |
|
|
|
## |
|
|
|
# Extract active filters from the http params |
|
|
|
# Extract active filters from the http params |
|
|
|
def http_filter_parameters |
|
|
|
def http_filter_parameters |
|
|
|
|
|
|
|
params[:fields] ||= [] |
|
|
|
(params[:fields].reject { |f| f.empty? } || []).inject({:operators => {}, :values => {}}) do |hash, field| |
|
|
|
(params[:fields].reject { |f| f.empty? } || []).inject({:operators => {}, :values => {}}) do |hash, field| |
|
|
|
hash[:operators][field.to_sym] = params[:operators][field] |
|
|
|
hash[:operators][field.to_sym] = params[:operators][field] |
|
|
|
hash[:values][field.to_sym] = params[:values][field] |
|
|
|
hash[:values][field.to_sym] = params[:values][field] |
|
|
|