app/models/mixins/relationship_mixin.rb
def parent_rel(*args)
    rels = parent_rels(*args).take(2)
    raise _("Multiple parents found.") if rels.length > 1
    rels.first
  end
# Returns the relationship of the parent of the record, nil for a root node
Returns the relationship of the parent of the record, nil for a root node
Returns the relationship of the parent of the record nil for a root node
def parent_rel(*args)
    rels = parent_rels(*args).take(2)
    raise _("Multiple parents found.") if rels.length > 1
    rels.first
  end
def parent_rel ( * args ) rels = parent_rels ( * args ) . take ( 2 ) raise _ ( "Multiple parents found." ) if rels . length > 1 rels . first end
Returns the relationship of the parent of the record, nil for a root node
Returns the relationship of the parent of the record nil for a root node
args