thanks for the taking the time to read my question.
I’m pulling information for purposes of calculation:
...collect{|x| [x.calc_year,x.calc_month, x.amount]
Now I want to be able to put all the 2010, 2011 values in different arrays so I can easily fetch the values for the months.
for example year[“2011”][1] or year[“2010”][0] ..
And my second question is, lets say I dont have any information for the 5th month, I want to be able to enter 0 for the amount and enter the 5th month detail.
thank you
You can use
group_byFor the second question, you can loop through and first write blanks for all the years since the previous year.