rails/rails — pull request #10489 by btucker (2013-05-06 22:38:14+00:00)
Title: Confirm a record has not already been destroyed before decrementing counter cache

At present, calling destroy multiple times on the same record results
in the belongs_to counter cache being decremented multiple times. With
this change the record is checked for whether it is already destroyed
prior to decrementing the counter cache.