app/models/plan.rb
def citation
    return nil unless owner.present? && doi.is_a?(Identifier)

    # authors = owner_and_coowners.map { |author| author.name(false) }
    #                             .uniq
    #                             .sort { |a, b| a <=> b }
    #                             .join(", ")
    # TODO: display all authors once we determine the appropriate way to handle on the ORCID side
    authors = owner.name(false)
    pub_year = updated_at.strftime('%Y')
    app_name = ApplicationService.application_name
    "#{authors}. (#{pub_year}). \"#{title}\" [Data Management Plan]. #{app_name}. #{doi.value}"
  end
# Return the citation for the DMP
#    Author name. (yyy, mm, dd). Title of DMP (Version XX). DMPHub. DOI
Return the citation for the DMP
Author name.
Return the citation for the DMP Author name .
def citation
    return nil unless owner.present? && doi.is_a?(Identifier)
    authors = owner.name(false)
    pub_year = updated_at.strftime('%Y')
    app_name = ApplicationService.application_name
    "#{authors}. (#{pub_year}). \"#{title}\" [Data Management Plan]. #{app_name}. #{doi.value}"
  end
def citation return nil unless owner . present? && doi . is_a? ( Identifier ) authors = owner . name ( false ) pub_year = updated_at . strftime ( '%Y' ) app_name = ApplicationService . application_name "#{authors}. (#{pub_year}). \"#{title}\" [Data Management Plan]. #{app_name}. #{doi.value}" end
Return the citation for the DMP
Author name.
Return the citation for the DMP Author name .
# authors = owner_and_coowners.map { |author| author.name(false) } #                             .uniq #                             .sort { |a, b| a <=> b } #                             .join(", ") # TODO: display all authors once we determine the appropriate way to handle on the ORCID side