lib/active_ldap/persistence.rb in activeldap-6.0.1 vs lib/active_ldap/persistence.rb in activeldap-6.0.2
- old
+ new
@@ -79,12 +79,13 @@
end
true
end
end
- def reload
+ def reload(options={})
clear_association_cache
- _, attributes = search(:value => id).find do |_dn, _attributes|
+ search_options = options.merge(value: id)
+ _, attributes = search(search_options).find do |_dn, _attributes|
dn == _dn
end
if attributes.nil?
raise EntryNotFound, _("Can't find DN '%s' to reload") % dn
end