For my school project I am buiding a time registration program. It is my first in ruby on rails, so even the simplest things are hard . ;)
The situation:
Users can work on a project, and I want to display in a chart how many hours each user worked on a project, let's say, each month. The chart plugin works like this:
first_serie = OpenFlashChartLazy::Serie.new(
[["2008-1",100],["2008-2",120],["2008-3",130]],
{:title=>"name_of_user1",:start_date=>Time.mktime(2008,1,1),:items=>8})
This adds a new line in the graph.
my question is: how can I loop through all my users and for each fill a new series with data from the database?