Forum: Ruby on Rails Grouping in tables

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
John S. (Guest)
on 2009-05-13 18:18
I have an app which uses ActiveResource to get data from a non-Rails
client. One of the things it has to do is display that data in a
webpage, with subtotals by week. What's an easy way to break up a
collection of ARes instances by a column so I can then pump each group
into a partial. The partial then displays the lines for that group, and
a sub-total at the end.

The other way I could do it is to xml-ise the ARes records, generate the
table, with groups and subtotals using XSLT, and then feed that as text
into a render method. But that involves stepping outside Rails to format

Anyone have any ideas?


John S.
This topic is locked and can not be replied to.