to be honest, i don't really understand what you are trying to do, but
if you just want to build a sum to put it into some field:
initialize a variable with 0 (outside of your for-loop) and add any
value you want to that variable.

sum = 0
rows.each do |row|
  sum += row.value
end
puts sum
--~--~---------~--~----~------------~-------~--~----~
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