Kez,
That's pretty much where I ended up with my "real" applicaton (except I'm not clever enough to remember to use map). The one thing I did do was have the model have a method for getting just the dates being asked for and it looks something like:
def self.all_by_dates(startDate, endDate)
filter(:date => startDate..endDate).all
end
This will give only the dates for the month in question. Then you can use your function on fewer items and pass fewer items to the view.
Thanks for sharing the code!
Scott
--
Scott
http://steamcode.blogspot.com/