change link to the pdf to go through rails