def condition_filterrific_params(fp)
      fp.each do |key, val|
        case
        when val.is_a?(Proc)
          # evaluate Procs
          fp[key] = val.call
        when val.is_a?(Array)
          # type cast integers in the array
          fp[key] = fp[key].map { |e| e =~ integer_detector_regex ? e.to_i : e }
        when val.is_a?(Hash)
          # type cast Hash to OpenStruct so that nested params render correctly
          # in the form
          fp[key] = OpenStruct.new(fp[key])
        when val =~ integer_detector_regex
          # type cast integer
          fp[key] = fp[key].to_i
        end
      end
      fp
    end
def condition_filterrific_params(fp)
      fp.each do |key, val|
        case
        when val.is_a?(Proc)
          # evaluate Procs
          fp[key] = val.call
        when val.is_a?(Array)
          # type cast integers in the array
          fp[key] = fp[key].map { |e| e =~ integer_detector_regex ? e.to_i : e }
        when val.is_a?(Hash)
          # type cast Hash to OpenStruct so that nested params render correctly
          # in the form
          fp[key] = OpenStruct.new(fp[key])
        when val =~ integer_detector_regex
          # type cast integer
          fp[key] = fp[key].to_i
        end
      end
      fp
    end
Conditions params: Evaluates Procs and type casts integer values.
 @param fp [Hash] the filterrific params hash
 @return[Hash] the conditioned params hash