| Module | ActiveLdap::Attributes |
| In: |
lib/active_ldap/attributes.rb
|
# File lib/active_ldap/attributes.rb, line 3 3: def self.included(base) 4: base.class_eval do 5: extend(ClassMethods) 6: extend(Normalizable) 7: include(Normalizable) 8: end 9: end
# File lib/active_ldap/attributes.rb, line 128
128: def attributes_protected_by_default
129: [dn_attribute, 'objectClass']
130: end
# File lib/active_ldap/attributes.rb, line 132
132: def normalize_attribute_name(name)
133: self.class.normalize_attribute_name(name)
134: end
# File lib/active_ldap/attributes.rb, line 114
114: def remove_attributes_protected_from_mass_assignment(targets)
115: needless_attributes = {}
116: (attributes_protected_by_default +
117: (self.class.protected_attributes || [])).each do |name|
118: needless_attributes[to_real_attribute_name(name)] = true
119: end
120:
121: targets.collect do |key, value|
122: [to_real_attribute_name(key) || key, value]
123: end.reject do |key, value|
124: needless_attributes[key]
125: end
126: end