app/models/mixins/relationship_mixin.rb
# Adds a new relationship for this node
Adds a new relationship for this node
Adds a new relationship for this node
def add_relationship(parent_rel = nil)
    clear_relationships_cache
    all_relationships.create!(
      :relationship => (parent_rel.nil? ? relationship_type : parent_rel.relationship),
      :parent       => parent_rel
    )
  end
def add_relationship ( parent_rel = nil ) clear_relationships_cache all_relationships . create! ( :relationship => ( parent_rel . nil? ? relationship_type : parent_rel . relationship ) , :parent => parent_rel ) end
Adds a new relationship for this node
Adds a new relationship for this node
parent_rel
<not_specific>