Mix this module into your controller, and all actions in that controller will be able to stream data to the client as it’s written. class MyController < ActionController::Base include ActionController::Live def stream response.headers['Content-Type'] = 'text/event-stream' 100.times { response.stream.write "hello world\n" sleep 1 } ensure response.stream.close end end There are a few caveats with t
TL;DR Rails 4.0 will allow you to stream arbitrary data at arbitrary intervals with Live Streaming. HAPPY MONDAY EVERYONE! Besides enabling multi-threading by default, one of the things I really wanted for Rails 4.0 is the ability to stream data to the client. I want the ability to treat the response object as an I/O object, and have the data I write immediately available to the client. Essentiall
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く