Content-type when using format.js { render :json => @person }

The current behavior is that the response content-type is javascript.
Is this expected or should the content-type be json? I'm doing an ajax
request (that's why it's format.js) which expects a json response. Or
did I miss setting something in the request header and should have
used format.json?

.js is short for JavaScript, and that's the content type you're requesting.

-- Assaf
http://labnotes.org

Sorry about that, I had the wrong impression that respond to format.js
simply meant responding to an ajax request. So I missed setting the
HTTP Accept header to 'application/json' to use format.json. Thanks