Closed abrisse closed 11 years ago
If I change the following lines :
format.upcase!
Renderers.const_get(format).new(context, locals).render(compiled_template)
to
Renderers.const_get(format.upcase).new(context, locals).render(compiled_template)
It seems to fix the problem that occurs with a Accept: application/json
. At the next request, params[:format] equals :JSON instead of :json which causes a 406 Error HTTP (since I use a respond_to :json in my controller)
What is the value of your context.params[:format]
? because your change is supposed to do absolutely nothing different..
Can you reproduce this into a small app or within a test ?
request.format
isn't always set withrabl-rails
. I had no problem withrabl
.The response header 'Content-Type' is sometimes invalid too. (return text/html instead of application/json during the first request in my app).
Any idea ?