RailsのプラグインでCometなアプリケーションを簡単に書けるようになったら、うれしいかもしれません。Juggernautというものありますが、これは80番ポート以外をつかうので全然うれしくない。 そこで、書いてみました。polling_methodを指定してあげると、:wait_forで指定したアクションが実行されるまで、HTTPコネクションをつかんだままで、アクションの実行を待機します。 例えば、Controllerクラスは、次のようになります。 class CounterController :increment def count render :update do |page| page.replace_html 'count', @counter.count end end def increment @counter.increment! :count render_te