Matriz de colapso de Ruby on Rails

your_array.flatten(level)
Nimorum