How To Add A Format To Rails Url Or Path Helpers

Posted by Weston Ganger

Sometimes you want to add a format such as .pdf or .json to an url/path helper. It easy just do:

your_path(format: :json)
your_url(format: :pdf)

Related External Links:

Article Topic:Software Development - Rails

Date:March 22, 2015

Recommended Posts



Send Me A Message

I would love to get in touch and talk about your next project. Feel free to send a message and I will get back to you shortly.

Get Connected