Project

General

Profile

« Previous | Next » 

Revision 5f929912

Added by Marc Dequènes about 14 years ago

  • ID 5f929912b251a05a3298925a9e4cf9ff4d71ab7a

[evol] vattrs: normalize when setting field with helpers (refs #141)

View differences:

conf/ldap_shadows/worlds/OpenLDAP_config/shadows/Administration/plugins/aspects/database_hdb.rb
# should methods be generated by metaprogramming ?
# (to ensure type_cast/normalize_value and not to repeat attr parameters)
ldap_virtual_attr :plopToto2, '1.3.6.1.4.1.1466.115.121.1.15'
def plopToto2(always_array = true)
......
end
def plopToto2=(val)
pp self.schema.ldap_syntax('1.3.6.1.4.1.1466.115.121.1.15').normalize_value(367)
pp "TAISTE 2"
pp val
end
conf/ldap_shadows/worlds/OpenLDAP_config/shadows/Administration/plugins/objects/global.rb
# should methods be generated by metaprogramming ?
# (to ensure type_cast/normalize_value and not to repeat attr parameters)
ldap_virtual_attr :plopToto, '1.3.6.1.4.1.1466.115.121.1.15'
def plopToto(always_array = true)
......
end
def plopToto=(val)
pp self.schema.ldap_syntax('1.3.6.1.4.1.1466.115.121.1.15').normalize_value(367)
pp "TAISTE"
pp val
end
lib/ldap_shadows/elements/object.rb
val = item.dn
end
else
val = self.schema.ldap_syntax(attr_info[:syntax]).normalize_value(val) unless attr_info[:syntax].nil?
end
old_val = self.send(field, true)

Also available in: Unified diff