エントリーの編集

エントリーの編集は全ユーザーに共通の機能です。
必ずガイドラインを一読の上ご利用ください。
#401 ActionController::Live (pro) - RailsCasts
記事へのコメント0件
- 注目コメント
- 新着コメント
このエントリーにコメントしてみましょう。
注目コメント算出アルゴリズムの一部にLINEヤフー株式会社の「建設的コメント順位付けモデルAPI」を使用しています

- バナー広告なし
- ミュート機能あり
- ダークモード搭載
関連記事
#401 ActionController::Live (pro) - RailsCasts
include ActionController::Live def create response.headers["Content-Type"] = "text/javascript" at... include ActionController::Live def create response.headers["Content-Type"] = "text/javascript" attributes = params.require(:message).permit(:content, :name) @message = Message.create(attributes) $redis.publish('messages.create', @message.to_json) end def events response.headers["Content-Type"] = "text/event-stream" redis = Redis.new redis.psubscribe('messages.*') do |on| on.pmessage do |pattern, e