Sha256: 078463bd5b2dc4762d9d174508bf60c588fb38466c9cfbe79b1ed9b7999d4bf1
Contents?: true
Size: 475 Bytes
Versions: 22
Compression:
Stored size: 475 Bytes
Contents
class Datagrid::Filters::BooleanEnumFilter < Datagrid::Filters::EnumFilter #:nodoc: YES = "YES" NO = "NO" def initialize(report, attribute, options = {}, &block) options[:select] = [YES, NO].map do |key, value| [I18n.t("datagrid.filters.eboolean.#{key.downcase}", :default => key.downcase.capitalize), key] end super(report, attribute, options, &block) end def checkbox_id(value) [object_name, name, value].join('_').underscore end end
Version data entries
22 entries across 22 versions & 1 rubygems