I'm sending a request from jquery and expecting json response. Configuration is like this:
type: 'POST',
cache: false,
iframe: true,
dataType: "json",
Now there's a funny thing. When I return data as text, it works fine:
render :text => "{}"
But when I use :json
option, firefox prompts me to download file containing exactly two characters, {}
. Success callback is never invoked.
render :json => {}
Since there's already a workaround (see above), the question has only theoretical value. Did it ever happen to you?