HTTP streaming is on = no json content #1337

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

Comments

Projects
None yet
2 participants
@andriytyurnikov
Contributor

andriytyurnikov commented May 26, 2011

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

@josevalim josevalim closed this in 7da88c5 Jul 6, 2011

jhtwong pushed a commit to SAP-Oxygen/rails that referenced this issue Jul 8, 2011

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment