title: Ruby on Rails return results in % or blocks of info
body: <p>I have a web app on Ruby on rails with more than 20 million records and counting in a Postgres database. I have a page/controller that does some big time operations with this data so the user is waiting for more time that I would like.</p>
  
  <p>Is there any way I can return data in blocks of info? I mean, I imagine the user seeing the first 10 rows and waiting for the next ones with a percentage bar that informs him how much is done (10% data returned for ex.)</p>
  
  <p>I guess that with multiple ajax/json calls this could be done but I'm trying to avoid multiple calls.</p>
  
  <p>More: Are websockets really a choice here?</p>
  
  <p>By the way, I'm using Rails 3.2</p>