HTML ドキュメントをリアルタイムで変更したい。
イベントで変数が変化すると、HTTPドキュメント(.erbファイル)も一緒に自動的に変化するはずです。
#controller.rb
puts("Downloading...")
bt = RubyTorrent::BitTorrent.new("public/files/ubuntu.torrent")
bt.on_event(self, :complete) { @donemessage="Done!" } #<-- This event
#index.html.erb
<h1>Transfers</h1>
<p><%= @donemessage %></p> <!-- <- This must be changed -->
どうやってやるの?