app/models/mixins/relationship_mixin.rb
# Returns the relationship node for this record.  If there are multiple nodes,
#   the first is returned, unless :raise_on_multiple is passed as true.
Returns the relationship node for this record.  If there are multiple nodes,
the first is returned, unless :raise_on_multiple is passed as true.
Returns the relationship node for this record . If there are multiple nodes the first is returned unless : raise_on_multiple is passed as true .
def relationship(*args)
    options = args.extract_options!
    if options[:raise_on_multiple]
      rels = relationships.take(2)
      raise _("Multiple relationships found") if rels.length > 1
      rels.first
    else
      relationships.first
    end
  end
def relationship ( * args ) options = args . extract_options! if options [ :raise_on_multiple ] rels = relationships . take ( 2 ) raise _ ( "Multiple relationships found" ) if rels . length > 1 rels . first else relationships . first end end
Returns the relationship node for this record.
Returns the relationship node for this record .
args
<not_specific>