def ordered_custom_fields(name)
      self.send(:"#{name}_custom_fields").sort { |a, b| (a.position || 0) <=> (b.position || 0) }
    end
def ordered_custom_fields(name)
      self.send(:"#{name}_custom_fields").sort { |a, b| (a.position || 0) <=> (b.position || 0) }
    end
Returns the ordered list of custom fields for a relation

 @example the Person class has somewhere in its code this: "custom_fields_for :addresses"
   person.ordered_custom_fields(:addresses)

 @param [ String, Symbol ] name The name of the relation.

 @return [ Collection ] The ordered list.