Class: Datagrid::Filters::BooleanFilter

Inherits:
BaseFilter
  • Object
show all
Defined in:
lib/datagrid/filters/boolean_filter.rb

Instance Attribute Summary

Attributes inherited from BaseFilter

#block, #grid_class, #name, #options

Instance Method Summary collapse

Methods inherited from BaseFilter

#allow_blank?, #allow_nil?, #apply, #default, #default_scope?, #dummy?, #enabled?, #enum_checkboxes?, #form_builder_helper_name, form_builder_helper_name, #format, #header, #input_options, #label_options, #multiple?, #parse_values, #range?, #separator, #supports_range?, #type, #unapplicable_value?

Instance Method Details

#default_input_optionsObject



14
15
16
# File 'lib/datagrid/filters/boolean_filter.rb', line 14

def default_input_options
  { **super, type: "checkbox" }
end

#parse(value) ⇒ Object



18
19
20
# File 'lib/datagrid/filters/boolean_filter.rb', line 18

def parse(value)
  Datagrid::Utils.booleanize(value)
end