Revision a987d14b
Added by Marc Dequènes about 15 years ago
- ID a987d14bef24ab8eeda765fb3924ceea6b340a05
lib/ldap_shadows/object.rb | ||
---|---|---|
end
|
||
|
||
def fetch_relations_data(rel_list, expert_attributes)
|
||
p rel_list
|
||
rel_data = rel_list.collect do |rel|
|
||
data = self.send(rel)
|
||
if data.is_a? Enumerable
|
||
... | ... | |
multiple = true
|
||
end
|
||
else
|
||
if data.target.nil?
|
||
# the exists? method also ensure the object is loaded
|
||
if data.exists?
|
||
value = nil
|
||
else
|
||
value = data.name
|
Also available in: Unified diff
[fix] for non-enumeration association the object was not loaded when requested with the target() method, so now test existance with exists?() instead which forces loading