How to tell which format a controller has resolved to render
in your controller you can do:
request.format
request.format.html?
request.format.js?
request.format.json?
# etc.
The method to access the format is:
controller.request.format
in your controller you can do:
request.format
request.format.html?
request.format.js?
request.format.json?
# etc.
The method to access the format is:
controller.request.format