rails/rails — pull request #17074 by tamird (2014-09-26 21:20:40+00:00)
Title: Deprecate `(?:in|de)crement!?`

These methods are useless sugar and are quite dangerous. They implement
last-write-wins while having names that suggest atomicity and safety.

The AR convention seems to prefer that `UPDATE` queries be made via
class methods - these methods are already available in `CounterCache`.

Reintroducing these methods is a tricky proposition, because doing it
right means adding a read immediately after the update to update the
in-memory value; this requires a transaction and some state tracking to
ensure that other dirty attributes are not discarded.

This is a predecessor to https://github.com/rails/rails/pull/17073 which should be safe to merge for 4.2.