I'm new to rails and I'm also new to database access so hopefully this
will be easy to answer, and hopefully I can explain it well enough to be
understood.

I've got ActiveRecord objects that all relate to eachother.  User and
Game have a many to many relationship connected via GameCollection.
GameCollection also has various attributes such as percentComplete.
Every user has a certain number of points.  What I am trying to do is
increment the points for each user that has a game with a certain id and
percentComplete = 100.  I'm looking to do this by calling
GameCollection.update or User.update.  I'd be curious how I might be
able to do it either way.  I just can't seem to figure out the correct
syntax...

Any ideas?  Is this doable?  I've previously been doing it manually
using ruby code, but that is really slow and I want to take advantage of
the power of mysql updates.
-- 
Posted via http://www.ruby-forum.com/.

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