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
Version | Path |
---|---|
datagrid-1.3.7 | lib/datagrid/filters/boolean_enum_filter.rb |
datagrid-1.3.6 | lib/datagrid/filters/boolean_enum_filter.rb |