Skip to content
This repository

HTTP streaming is on = no json content #1337

Closed
andriytyurnikov opened this Issue May 26, 2011 · 0 comments

2 participants

Andriy Tyurnikov José Valim
Andriy Tyurnikov

#when
#in SomeController
stream

def some_action
respond_to do |format|
format.json do
render :json => @some_collection.map{ |p| { id: p.id, name: p.full_name} }
end
end
end

#request and respose headers looks same, but no JSON content is visible in browser

#Perhaps it is misuse or something, but it should be documented or reimplemented defensively then, IMHO

José Valim josevalim closed this issue from a commit July 06, 2011
José Valim Remove stream at the class level.
This is because only template rendering works with streaming.
Setting it at the class level was also changing the behavior
of JSON and XML responses, closes #1337.
7da88c5
José Valim josevalim closed this in 7da88c5 July 06, 2011
Joseph Wong jhtwong referenced this issue from a commit in SAP-Oxygen/rails July 06, 2011
José Valim Deprecate stream at the class level.
This is because only template rendering works with streaming.
Setting it at the class level was also changing the behavior
of JSON and XML responses, closes #1337.
a05d59f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.