Hi,

In <3a94cf510705011421r694abd13sf641b441d2f9d313 / mail.gmail.com>
  "Re: ActiveLdap questions" on Wed, 2 May 2007 06:21:17 +0900,
  "Francis Cianfrocca" <garbagecat10 / gmail.com> wrote:

> Look into the Net::LDAP library on Rubyforge, also installable as a gem. It
> has a reasonably complete rdoc, including some theory of how LDAP queries
> work.

But Net::LDAP doesn't support START_TLS. I think Net::LDAP
is a low level library rather than ActiveLdap. To modify
a LDAP entry, I prefer

  someone = User.find("someone")
  someone.description = "Who am I?"
  someone.save

rather than

  ldap.search(:base => "...", :filter => "cn=someone") do |someone|
    if someone.description.empty?
      ops = [[:add, :description, "Who am I?"]]
    else
      ops = [[:replace, :description, "Who am I?"]]
    end
    ldap.modify :dn => dnsomeone.dn, :operations => ops
  end


ActiveLdap has a framework to support Net::LDAP as backend
but Net::LDAP doesn't have enough functions such as
START_TLS support.


Thanks,
--
kou