Sha256: 9e3b437d0fbce32e26fb98d2feec3bacbc6b98c19a18f399ebdd57fc5d5fd54f
Contents?: true
Size: 676 Bytes
Versions: 5
Compression:
Stored size: 676 Bytes
Contents
module ActiveAdmin module Inputs class FilterBooleanInput < ::Formtastic::Inputs::BooleanInput include FilterBase def to_html input_wrapping do [ label_html, check_box_html ].join("\n").html_safe end end def search_method method =~ search_conditions ? method : "#{method}_eq" end def checked? object && boolean_checked?(object.send(search_method), checked_value) end def input_html_options { name: "q[#{ search_method }]" } end def search_conditions /_(true|false|present|blank|null|not_null)\z/ end end end end
Version data entries
5 entries across 5 versions & 2 rubygems