This project is archived and is in readonly mode.

#493 ✓resolved
Emilio Tagua

update_counters should update nil values

Reported by Emilio Tagua | June 26th, 2008 @ 05:50 PM | in 2.1.1

Sometimes i want to update a counter that hasn't a default value, therefore nil (null in the database) is the default.

With this patch update_counters will work on null values assuming they have a value of 0.

Tested in mysql, sqlite, sqlite3 and postgres.

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>

Pages