Created
September 20, 2011 21:54
-
-
Save sarcilav/1230528 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def pdf_url(url) | |
"http://pdfmyurl.com/?url=#{url}" | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
link_to( "Download PDF", pdf_url(some_url(with_some_params)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I found a better solution, I gess..
using
gem pdf-my-url
then just use
<%= pdf_my_url 'CBC', 'http://www.cbc.ca/' %>
<%= pdf_my_url 'CBC', 'http://www.cbc.ca/', :filename => 'CBC.pdf' %>
https://github.com/ksylvest/pdf-my-url/wiki