Skip to content

Commit

Permalink
Merge pull request #21 from sdalu/patch-1
Browse files Browse the repository at this point in the history
Boolean filtering
  • Loading branch information
mkristian committed May 20, 2016
2 parents 740298e + feb41b4 commit 8894461
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/adapters/ldap_adapter.rb
Expand Up @@ -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
Expand Down

0 comments on commit 8894461

Please sign in to comment.