| Module | ActiveLdap::Attributes |
| In: |
lib/active_ldap/attributes.rb
|
# File lib/active_ldap/attributes.rb, line 3 3: def self.included(base) 4: base.extend(ClassMethods) 5: end
# File lib/active_ldap/attributes.rb, line 195
195: def attributes_protected_by_default
196: [dn_attribute, 'objectClass']
197: end
# File lib/active_ldap/attributes.rb, line 199
199: def normalize_attribute_name(name)
200: self.class.normalize_attribute_name(name)
201: end
# File lib/active_ldap/attributes.rb, line 181
181: def remove_attributes_protected_from_mass_assignment(targets)
182: needless_attributes = {}
183: (attributes_protected_by_default +
184: (self.class.protected_attributes || [])).each do |name|
185: needless_attributes[to_real_attribute_name(name)] = true
186: end
187:
188: targets.collect do |key, value|
189: [to_real_attribute_name(key), value]
190: end.reject do |key, value|
191: key.nil? or needless_attributes[key]
192: end
193: end