Sha256: b9919b4015df4155c4cf22a710f39162c14ba83cd38b1e5c3a7c6431c3707a43

Contents?: true

Size: 274 Bytes

Versions: 14

Compression:

Stored size: 274 Bytes

Contents

module Headmin
  module Filter
    class Boolean < Headmin::Filter::Base
      OPERATORS = %w[eq not_eq is_null is_not_null]

      def cast_value(value)
        ActiveModel::Type::Boolean.new.cast(value)
      end

      def to_s
        string
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
headmin-0.6.3 app/models/headmin/filter/boolean.rb
headmin-0.6.2 app/models/headmin/filter/boolean.rb
headmin-0.6.1 app/models/headmin/filter/boolean.rb
headmin-0.6.0 app/models/headmin/filter/boolean.rb
headmin-0.5.9 app/models/headmin/filter/boolean.rb
headmin-0.5.8 app/models/headmin/filter/boolean.rb
headmin-0.5.7 app/models/headmin/filter/boolean.rb
headmin-0.5.6 app/models/headmin/filter/boolean.rb
headmin-0.5.5 app/models/headmin/filter/boolean.rb
headmin-0.5.4 app/models/headmin/filter/boolean.rb
headmin-0.5.3 app/models/headmin/filter/boolean.rb
headmin-0.5.2 app/models/headmin/filter/boolean.rb
headmin-0.5.1 app/models/headmin/filter/boolean.rb
headmin-0.5.0 app/models/headmin/filter/boolean.rb