app/controllers/record_controller.rb
def primo_redirect
    redirect_url = if alma_docid.present?
                     [ENV.fetch('MIT_PRIMO_URL'), '/discovery/fulldisplay?docid=', 
                      alma_docid, '&vid=', ENV.fetch('PRIMO_VID')].join('')
                   else
                     ENV.fetch('PRIMO_SPLASH_PAGE')
                   end
    redirect_to redirect_url, status: 308
  end
# We need to leave this method and the direct_link route because the record links have historically been used as 
# permalinks and should therefore be redirected to Primo records indefinitely.
We need to leave this method and the direct_link route because the record links have historically been used as
permalinks and should therefore be redirected to Primo records indefinitely.
We need to leave this method and the direct_link route because the record links have historically been used as permalinks and should therefore be redirected to Primo records indefinitely .
def primo_redirect
    redirect_url = if alma_docid.present?
                     [ENV.fetch('MIT_PRIMO_URL'), '/discovery/fulldisplay?docid=', 
                      alma_docid, '&vid=', ENV.fetch('PRIMO_VID')].join('')
                   else
                     ENV.fetch('PRIMO_SPLASH_PAGE')
                   end
    redirect_to redirect_url, status: 308
  end
def primo_redirect redirect_url = if alma_docid . present? [ ENV . fetch ( 'MIT_PRIMO_URL' ) , '/discovery/fulldisplay?docid=' , alma_docid , '&vid=' , ENV . fetch ( 'PRIMO_VID' ) ] . join ( '' ) else ENV . fetch ( 'PRIMO_SPLASH_PAGE' ) end redirect_to redirect_url , status : 308 end
We need to leave this method and the direct_link route because the record links have historically been used as
permalinks and should therefore be redirected to Primo records indefinitely.
We need to leave this method and the direct_link route because the record links have historically been used as permalinks and should therefore be redirected to Primo records indefinitely .