class Gum::Filters::Exists
Constants
- FALSE_VALUES
Private Instance Methods
__render__(value)
click to toggle source
# File lib/gum/filters/exists.rb, line 8 def __render__(value) if value { exists: { field: field } } else { bool: { must_not: { exists: { field: field } } } } end end
empty?(value)
click to toggle source
# File lib/gum/filters/exists.rb, line 20 def empty?(value) value.nil? || value.try(:empty?) end
value_from(params)
click to toggle source
Calls superclass method
Gum::Filter#value_from
# File lib/gum/filters/exists.rb, line 16 def value_from(params) !FALSE_VALUES.include?(super) end