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.
Showing
想要评论请 注册 或 登录