Building on the search example in this question, how would one use the net-ldap Gem to test whether the search()
method returns no results, or some results?
Asked
Active
Viewed 157 times
0

Community
- 1
- 1

Yolo Perdiem
- 103
- 2
1 Answers
0
By how it's used in the other question you linked to, it seems to return an array, so you could just call empty?
on the result.
There's also this interesting bit of information in the documentation you linked to:
When :return_result => false, search will return only a Boolean, to indicate whether the operation succeeded.

Michael Kohl
- 66,324
- 14
- 138
- 158