def collect_custom_fields_diff(name, fields)
      # puts "==> collect_custom_fields_diff for #{name}, #{fields.size}" # DEBUG

      memo = self.initialize_custom_fields_diff(name)

      fields.map do |field|
        field.collect_diff(memo)
      end

      # collect fields with a modified localized field
      fields.each do |field|
        if field.localized_changed? && field.persisted?
          self._custom_field_localize_diff[name] << { field: field.name, localized: field.localized? }
        end
      end
    end
def collect_custom_fields_diff(name, fields)
      # puts "==> collect_custom_fields_diff for #{name}, #{fields.size}" # DEBUG

      memo = self.initialize_custom_fields_diff(name)

      fields.map do |field|
        field.collect_diff(memo)
      end

      # collect fields with a modified localized field
      fields.each do |field|
        if field.localized_changed? && field.persisted?
          self._custom_field_localize_diff[name] << { field: field.name, localized: field.localized? }
        end
      end
    end
Collects all the modifications of the custom fields

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

 @return [ Array ] An array of hashes storing the modifications