Method: Puffer::Filters#query
- Defined in:
- lib/puffer/filters.rb
#query ⇒ Object
133 134 135 136 137 138 139 140 |
# File 'lib/puffer/filters.rb', line 133 def query (fieldset.map(&:field_name) + special_attributes).reduce(ActiveSupport::HashWithIndifferentAccess.new()) do |res, attribute| value = send(attribute) attribute = "#{attribute}_attributes" if respond_to?("#{attribute}_attributes=") res[attribute] = value if value.present? res end end |