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(Normalize) 7: include(Normalize) 8: end 9: end
# File lib/active_ldap/attributes.rb, line 203 203: def attributes_protected_by_default 204: [dn_attribute, 'objectClass'] 205: end
# File lib/active_ldap/attributes.rb, line 207 207: def normalize_attribute_name(name) 208: self.class.normalize_attribute_name(name) 209: end
# File lib/active_ldap/attributes.rb, line 189 189: def remove_attributes_protected_from_mass_assignment(targets) 190: needless_attributes = {} 191: (attributes_protected_by_default + 192: (self.class.protected_attributes || [])).each do |name| 193: needless_attributes[to_real_attribute_name(name)] = true 194: end 195: 196: targets.collect do |key, value| 197: [to_real_attribute_name(key) || key, value] 198: end.reject do |key, value| 199: needless_attributes[key] 200: end 201: end