app/models/publication.rb
#includes those related directly, or through an assay
includes those related directly, or through an assay
includes those related directly or through an assay
def related_data_files
    via_assay = assays.collect do |assay|
      assay.data_files
    end.flatten.uniq.compact
    via_assay | data_files
  end
def related_data_files via_assay = assays . collect do | assay | assay . data_files end . flatten . uniq . compact via_assay | data_files end
includes those related directly, or through an assay
includes those related directly or through an assay