Hey I am wondering what the location option for the render method in rails is. The docs here http://guides.rubyonrails.org/layouts_and_rendering.html states:
“You can use the :location option to set the HTTP Location header:”
But I have no idea why you would do this, or what you would use this for.
Actually
locationoption is used to redirect to a new resource as part of processing the request. For example,is telling the recipient that a XML file for the post is created and you will get this from
post_url(post). Hence GO THERE 😉rendermethod does this by setting theLocationoption in response objectYou can find details about
Locationheader here http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.30.