Thanks for your consideration, but I have solved this issue myself.
I fetched the data using ruby code, then passed the array created, when 
generating JS code.

Thanks anyway.

-- 
Posted via http://www.ruby-forum.com/.