On 19/05/2009, at 11:57 PM, John Small <rails-mailing-l...@andreas- 
s.net> wrote:

>
> How can I get sub-totalling in tables?
>
> I have an ActiveResource model which gets it's data from a legacy
> Windows app via REST. The records are ordered by date. I need to  
> display
> subtotals by week number. It looks like I'll have to code something,
> which isn't a problem, but this is such a common pattern someone must
> have done something before me.
>
> Any clues?
>
> John Small
> -- 
> Posted via http://www.ruby-forum.com/.
>
> >

Can't you simply group them then use the sum rails Enumerable method?

Blog: http://random8.zenunit.com/
Twitter: http://twitter.com/random8r
Learn: http://sensei.zenunit.com/
New video up now at http://sensei.zenunit.com/ real fastcgi rails  
deploy process! Check it out now!


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to