def delete_children(attribute)
      self.send(attribute).each { |c| c.parent = nil }
      self.send(attribute).clear
    end
def delete_children(attribute)
      self.send(attribute).each { |c| c.parent = nil }
      self.send(attribute).clear
    end
Removes all child references of the given type from this instance.

 @param [Symbol] attribute the name of the child attribute to be cleared