title: Ruby on Rails: How do detect if access by JSON?
body: <p>I got a GET URL that calls a controller method getInfo. It can be called by mydomain.com/getInfo.json?params=BLAHBLAH or mydomain.com/getInfo?params=BLAHBLAH</p>
  
  <p>In the controller, is there a way to detect how the user called it?</p>