app/models/proquest_behaviors.rb
# Try to determine page count. If page count can't be determined,
# default to "1" per request from ProQuest
Try to determine page count. If page count can't be determined,
default to "1" per request from ProQuest
Try to determine page count . If page count can ' t be determined default to " 1 " per request from ProQuest
def page_count
    primary_pdf_fs = members.select { |a| a.pcdm_use == "primary" }.first
    primary_pdf_fs.files.first.metadata.attributes["http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#pageCount"].first
  rescue
    "1"
  end
def page_count primary_pdf_fs = members . select { | a | a . pcdm_use == "primary" } . first primary_pdf_fs . files . first . metadata . attributes [ "http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#pageCount" ] . first rescue "1" end
Try to determine page count.
Try to determine page count .