Class | ActiveLdap::Association::HasMany |
In: |
lib/active_ldap/association/has_many.rb
|
Parent: | Collection |
# File lib/active_ldap/association/has_many.rb, line 19 19: def delete_entries(entries) 20: key = primary_key 21: components = @owner[@options[:foreign_key_name], true].reject do |value| 22: value.nil? 23: end 24: filter = [:and, 25: [:and, {key => components}], 26: [:or, {foreign_class.dn_attribute => entries.collect(&:id)}]] 27: foreign_class.update_all({key => []}, filter) 28: end
# File lib/active_ldap/association/has_many.rb, line 15 15: def find_target 16: collect_targets(:foreign_key_name) 17: end