Iterate through activerecords

Chris
2007-06-18T08:13:52Z

Hello,

I am a Rails newbie and I have problems to iterate through a list of
records.

pseudo code.

def do something
   @userlist = User.find(:all)
   @userlist.each {|item| item.calculate_stats item.save}
end

Ther problem is that running this throws an error:
ArgumentError (wrong number of arguments (1 for 0)):

Any ideas what''s goung wrong?

Thanks!
Chris


--~--~---------~--~----~------------~-------~--~----~
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
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---