Sha256: 996806b3fbd3e48a6821032ef44d142decdfab38f57a698d71b9ed4fcc7aeabc
Contents?: true
Size: 528 Bytes
Versions: 12
Compression:
Stored size: 528 Bytes
Contents
class Datagrid::Filters::BooleanEnumFilter < Datagrid::Filters::EnumFilter 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.humanize), key] end super(report, attribute, options, &block) end def apply(grid_object, scope, value) super(grid_object, scope, value) end def to_boolean(value) #TODO decide what to do with conversion end end
Version data entries
12 entries across 12 versions & 1 rubygems