app/models/concerns/hierarchical_entity.rb
def inherit_hierarchical_parent!
    return if top_level?

    inherited_hierarchical_parent = parent.hierarchical_parent

    return if inherited_hierarchical_parent.blank?

    writer = :"#{inherited_hierarchical_parent.hierarchical_child_association}="

    public_send writer, inherited_hierarchical_parent
  end
# If a parent collection changes its community, we need its children to to also inherit that update.
#
# So too with items' parents getting new collections.
#
# @!scope private
# @return [void]
If a parent collection changes its community, we need its children to to also inherit that update.
So too with items' parents getting new collections.
If a parent collection changes its community we need its children to to also inherit that update . So too with items ' parents getting new collections .
def inherit_hierarchical_parent!
    return if top_level?
    inherited_hierarchical_parent = parent.hierarchical_parent
    return if inherited_hierarchical_parent.blank?
    writer = :"#{inherited_hierarchical_parent.hierarchical_child_association}="
    public_send writer, inherited_hierarchical_parent
  end
def inherit_hierarchical_parent! return if top_level? inherited_hierarchical_parent = parent . hierarchical_parent return if inherited_hierarchical_parent . blank? writer = :" #{ inherited_hierarchical_parent . hierarchical_child_association } = " public_send writer , inherited_hierarchical_parent end
If a parent collection changes its community, we need its children to to also inherit that update.
If a parent collection changes its community we need its children to to also inherit that update .
None
void
!scope
None