So edge rails has some severe new sweetness. DHH announced a while ago that Rails 1.1 would respond to the HTTP-accept header thus allowing each action to respond differently based on what was being requested. Changeset 4384 adds on to that feature by making it possible to change the accept type by passing a parameter named format in the url.

For example, http://www.domain.com/action would return html. However, if you changed that request to http://www.domain.com/action?format=xml, Rails now overrides the default text/html accept header that the browser sends and responds with xml. Check out the changeset for more information.

Leave a Reply


(textile enabled)