Hacker News new | ask | show | jobs
by randomdata 5061 days ago
> First of all, there aren't really any decent solutions for the problem in Ruby.

Even ignoring other frameworks, Rails has supported streaming through various APIs since at least the 2.x days.

In Rails 2, you would pass a Proc to the render method giving direct access to the response.

Rails 3 changed the API to any Enumerable assigned to self.response_body, as described in the article.

Rails 4 gets yet another API. It may be arguably cleaner, but the end functionality remains the same as it has always been.