ActiveLDAP handle uppercase attributes?

Does anyone know how to assign values to LDAP objects with upper cased
attributes? For example, you can normally do:

   user = User.new(@user)
   user.sn = params[:user][attr]

But what about the case where there is an attribute that looks like
OXTimeZone? You clearly can’t do:

   user = User.new(@user)
   user.OXTimeZone = params[:user][attr]

I’m trying to figure out what I need to look at in the ActiveLDAP code
to find out what name it sets the method to for this attribute, but
havn’t sorted it out yet and figured it might be worth asking.

Thanks,
Leah

Leah C. wrote:

Does anyone know how to assign values to LDAP objects with upper cased
attributes?

It looks like the answer was to hack up a new lowercase version of the
method for those cases, or at least, that’s my temporary hack (in
lib/activeldap/base.rb):

 def define_attribute_methods(attr)
   #
   # Leah's hack to deal w/uppercase attrs (converts entire thing to 

lc)
#
if attr =~ /^[A-Z].*$/
@attr_methods[attr.downcase] = attr
end

   if @attr_methods.has_key? attr
     return
   end
   aliases = Base.schema.attribute_aliases(attr)
   aliases.each do |ali|
     @attr_methods[ali] = attr
   end
 end