title: Limiting rails to only responding to JSON and XML requests
body: <p>Is there a way to globally define a rails app to only serve json and xml and appropriately error on any other requests?</p>
  
  <p>I'm thinking it's something along the lines of a before_filter and responds_to block in the ApplicationController but that's as far as my investigation has got me.</p>