Sha256: f6694e27771e6c07ea5cdcd9e08f03358af881c15df3668d3763f0205afd64da
Contents?: true
Size: 871 Bytes
Versions: 59
Compression:
Stored size: 871 Bytes
Contents
module ActiveAdmin module Inputs class FilterCheckBoxesInput < ::Formtastic::Inputs::CheckBoxesInput include FilterBase def input_name "#{object_name}[#{association_primary_key || method}_in][]" end def selected_values @object.send("#{association_primary_key || method}_in") || [] end # Add whitespace before label def choice_label(choice) " #{super(choice)}" end # Don't wrap in UL tag def choices_group_wrapping(&block) template.capture(&block) end # Don't wrap in LI tag def choice_wrapping(html_options, &block) template.capture(&block) end # Don't render hidden fields def hidden_field_for_all "" end # Don't render hidden fields def hidden_fields? false end end end end
Version data entries
59 entries across 59 versions & 3 rubygems