This project is archived and is in readonly mode.

#1254 ✓resolved
Carlos Júnior (xjunior)

Array support to update_counters

Reported by Carlos Júnior (xjunior) | October 23rd, 2008 @ 12:46 AM

Many times I found my self needing to increment a lot of counters at the same time, but it's not possible yet.

Now we can do:

Model.increment_counter :points, [1, 2, 3] Model.decrement_counter :points, [1, 2, 3] Model.update_counters [1, 2, 3], :points => 1

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

Referenced by

Pages