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