Skip to content

Instantly share code, notes, and snippets.

@camwest
Created October 18, 2011 19:23
Show Gist options
  • Save camwest/1296421 to your computer and use it in GitHub Desktop.
Save camwest/1296421 to your computer and use it in GitHub Desktop.
module Owner
class Response
def each
10.times do |i|
yield("entry #{i}\n")
sleep 1
end
end
end
end
class ApplicationController < ActionController::Base
def index
headers['Content-Type'] = 'text/plain'
self.response_body = Owner::Response.new
end
end
StreamingTest::Application.routes.draw do
root :to => "application#index"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment