Permalink
Browse files

Merge pull request #21 from sdalu/patch-1

Boolean filtering
  • Loading branch information...
2 parents 740298e + feb41b4 commit 8894461583c68cb512938e548b81af8e656cabfa @mkristian committed May 20, 2016
Showing with 2 additions and 0 deletions.
  1. +2 −0 lib/adapters/ldap_adapter.rb
@@ -163,6 +163,8 @@ def to_ldap_conditions(query)
# assume a single value here !!!
val = c.send(:dumped_value)
ldap_conditions << [comparator, c.subject.field, val[1, val.size - 2]]
+ elsif c.subject.is_a? ::DataMapper::Property::Boolean
+ ldap_conditions << [comparator, c.subject.field, c.send(:dumped_value) ? 'TRUE' : 'FALSE']
else
ldap_conditions << [comparator, c.subject.field, c.send(:dumped_value)]
end

0 comments on commit 8894461

Please sign in to comment.