app/models/normalize_primo_common.rb
def sanitize_authors(authors)
    if authors.any? { |author| author.include?(';') }
      authors.map! { |author| author.split(';') }.flatten!
    end

    authors.map { |author| author.strip.gsub(/\$\$Q.*$/, '') }
  end
# This method is required to clean up bad data in the API response
This method is required to clean up bad data in the API response
This method is required to clean up bad data in the API response
def sanitize_authors(authors)
    if authors.any? { |author| author.include?(';') }
      authors.map! { |author| author.split(';') }.flatten!
    end
    authors.map { |author| author.strip.gsub(/\$\$Q.*$/, '') }
  end
def sanitize_authors ( authors ) if authors . any? { | author | author . include? ( ';' ) } authors . map! { | author | author . split ( ';' ) } . flatten! end authors . map { | author | author . strip . gsub ( / \$ \$ Q.*$ / , '' ) } end
This method is required to clean up bad data in the API response
This method is required to clean up bad data in the API response
authors