ActiveLDAP::Associations::ClassMethods (Module)

In: lib/activeldap/associations.rb

Methods

Public Instance methods

belongs_to

This defines a method for an extension class map its DN key attribute value on to multiple items which reference it by |:foreign_key| in the other LDAP entry covered by class |:class_name|.

Example:

 belongs_to :groups, :class_name => Group, :foreign_key => memberUid, :local_key => 'uid'

has_many

This defines a method for an extension class expand an existing multi-element attribute into ActiveLDAP objects. This discards any calls which result in entries that don’t exist in LDAP!

Example:

  has_many :members, :class_name => User, :local_key => memberUid, :foreign_key => 'uid'

TODO[ENH]: def #{…}=(val) to redefine group membership

This class function is used to setup all mappings between the subclass and ldap for use in activeldap

[Validate]