I have array of objects. I want to write method wich i will use such as this:
group(array, :category, :month, year)
and will return me a Hash such as this:
{ 'some category => { '2009' => { '01' => [objects], '02 => [objects2]code } } }
This should work simmilar to group_by, but I haven o idea to do that. I don't know how to handle number of group params. I can group group(array, :category)
or group(array, :a, :b, :c, :d, :e)
Any help?