With overwrite_params, I was doing this to prepare a PDF request for a page:
url_for(:overwrite_params => {:format => :pdf})
overwrite_params has been deprecated after Rails 2.3.8, is there a reason for this deprecation? What's the standard accepted alternative?
This is what your looking for:
url_for params.merge(:format => "PDF", :only_path => false)
This will create an absolute url for the current page including the current params.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With