I don't think there is any type of support for this.  You could do it really
easily by overriding the views.  You would only need to add like 4 lines of
code.

On Mon, Jan 26, 2009 at 8:12 PM, ncancelliere <[email protected]>wrote:

>
> I'm wondering how to best display a running total using ActiveRecord
> with ActiveScaffold.
>
> I am trying to display a table of commissions for given users.  Users
> belong to an account.  I know how to do a SUM method on my model, and
> this works ok for one user.  I really want to be able to show a
> running total across various users for a given account. It would also
> be good to only do this for items that are on the page (because as the
> list gets longer it will not be efficient to calculate this for all
> records).
>
> Any ideas?
>
> The output I'm looking for is like (the balance is the running total I
> owe as an owner):
>
> cindy Jan 10, 2008 earned $10.00 $10.00
> cindy Jan 11, 2008 earned $12.00 $22.00
> tom   Jan 11, 2008 earned $10.00  $32.00
> kyle  Jan 12, 2008 earned $12.00  $44.00
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"ActiveScaffold : Ruby on Rails plugin" 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/activescaffold?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to