This project is archived and is in readonly mode.
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
-
Carlos Júnior (xjunior) October 28th, 2008 @ 02:12 PM
- Title changed from Adding Array support to update_counters to [PATCH] Array support to update_counters
-
Pratik January 19th, 2009 @ 08:12 PM
- Tag changed from 2.2, activerecord, counters, counter_cache to 2.2, activerecord, counters, counter_cache, patch
- Milestone cleared.
- Assigned user set to Pratik
-
Pratik January 19th, 2009 @ 08:12 PM
- Title changed from [PATCH] Array support to update_counters to Array support to update_counters
-
Repository January 28th, 2009 @ 08:01 PM
- State changed from new to resolved
(from [74871961eccdb455f18e8ef66716041f2f828ba8]) Add array id support to Model.update_counters. [#1254 state:resolved] [Carlos Júnior] http://github.com/rails/rails/co...
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>
People watching this ticket
Attachments
Referenced by
- 1254 Array support to update_counters (from [74871961eccdb455f18e8ef66716041f2f828ba8]) Add arr...