Looks like the following works:

@breakdown[2].items.find_all {|item| item.prodtreat == "T"}.sum{|item|
item.spend}

Really have no idea why? So any help would be enlightening.

Thanks

Darren

PS. Have a feeling that this can be simplified to:

@breakdown[2].items.find_all {|item| item.prodtreat == "T"}.sum
(&:spend)

--~--~---------~--~----~------------~-------~--~----~
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