Project

General

Profile

« Previous | Next » 

Revision 9649c3cb

Added by Marc Dequènes about 15 years ago

  • ID 9649c3cbb785f2f5915ca432f50955eeb7eca91e

[evol] object general data now has associated relations (instead of gathering all possible remaining relations)

View differences:

test.rb
taken_attr_list = taken_attr_list.uniq & attr_list
obj_info = fetch_attributes_data(taken_attr_list, options)
attr_list -= taken_attr_list
obj_info.merge!(fetch_relations_data(rel_list, options)) unless rel_list.empty?
# manage general relations
if self.class.presentation[:associated_relations]
taken_rel_list = self.class.presentation[:associated_relations] & rel_list
unless taken_rel_list.empty?
obj_info.merge!(fetch_relations_data(taken_rel_list, options))
rel_list -= taken_rel_list
end
end
# second pass to dispath the remaining attributes
unless attr_list.empty?

Also available in: Unified diff