app/models/publication.rb
def related_organisms
    organisms = assays.collect{|a| a.organisms}.flatten
    organisms = organisms | models.collect{|m| m.organism}.flatten
    organisms.uniq.compact
  end
#returns a list of related organisms, related through either the assay or the model
returns a list of related organisms, related through either the assay or the model
returns a list of related organisms related through either the assay or the model
def related_organisms
    organisms = assays.collect{|a| a.organisms}.flatten
    organisms = organisms | models.collect{|m| m.organism}.flatten
    organisms.uniq.compact
  end
def related_organisms organisms = assays . collect { | a | a . organisms } . flatten organisms = organisms | models . collect { | m | m . organism } . flatten organisms . uniq . compact end
returns a list of related organisms, related through either the assay or the model
returns a list of related organisms related through either the assay or the model