title: Rails renders html not json when exception raised
body: <p>I hope someone can assist with this problem.</p>
  
  <p>I've got a web services app I'm writing in rails.  I'm using <a href="https://github.com/filtersquad/rocket_pants" rel="nofollow noreferrer">RocketPants</a> for the services and <a href="https://github.com/nathanl/authority" rel="nofollow noreferrer">Authority</a> for the authorization.</p>
  
  <p>I've run into an issue with exception handling where the Authority "that's now allowed" exception (Authority::SecurityViolation) is rendering as HTML, rather than JSON. </p>
  
  <p>I've documented the story in <a href="https://gist.github.com/jasonelston/4721540" rel="nofollow noreferrer">this gist</a> and <a href="https://github.com/nathanl/authority/issues/20" rel="nofollow noreferrer">this issue</a>.</p>
  
  <p>I can replicate by raising an exception within my ApiController like <code>raise "blah"</code>, and I get a html error page.  I've tried using <code>rescue_from</code> like in <a href="https://stackoverflow.com/questions/11489416/rails-renders-html-when-json-is-requested-when-there-is-an-error">this question</a> with the same unsuccessful result.</p>
  
  <p>I don't know where to from here. Anyone know of anything in the Rails exception handling stack that causes this? I'd be grateful for any assistance.</p>