If you cannot make this perform quicker in ruby language, I am afraid
that ROR will not be helpful in that way.

ROR is basically a framework for quick development and maintenance.
To improve the performance you need to either do it via backend or tweaking
the ROR in a complex way to perform better. The requirement you are
asking can be done in fewer lines of code in ROR. Check Active
Record tutorials and examples in the search engines.

On 20 April 2010 15:19, Patrick Clas <[email protected]> wrote:

> 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]<rubyonrails-talk%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/rubyonrails-talk?hl=en.
>
>


-- 
-- 
Nandri(Thanks in Tamil),
Amala Singh

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