how to send data from controller to a view in ruby
===

Im working with Ruby and I need to send a constant update status message to the user while a long-running task is being performed in the controller. 

The method insert some rows on the database, what I want it's to show the user a message like this: 

Upload in  progress, X number of files inserted.

Currently I'm using a LoadMask jQuery plugin but it only shows a simple message, and I dont know how to send the number of rows inserted with out interrupting the process.