Module: Surveygizmo::Client::Filter

Included in:
Surveygizmo::Client
Defined in:
lib/surveygizmo/client/filter.rb

Overview

Defines methods related to filtering search results

Instance Method Summary collapse

Instance Method Details

#formatted_filters(filters = {}) ⇒ Object

Format filters for the request querystring TODO: Not yet recursive

Parameters:

  • filters (Hash) (defaults to: {})

    Filter(s) used to refine search



10
11
12
# File 'lib/surveygizmo/client/filter.rb', line 10

def formatted_filters(filters = {})
  Hash[*filters.map{|key,value| ["filter[#{key}][0]", value]}.flatten]
end