rails/rails — pull request #13935 by arthurnn (2014-02-03 20:56:04+00:00)
Title: Make sure transaction state resets after commit

### Problem
If we open a transaction inside a `after_*` callback, it will increase the level on `@_start_transaction_state`, and the `committed!` method only resets one level. So when that happen that `@_start_transaction_state` would leaky to the next `save` method call.

### Solution
On `committed!` clear the entire state as after that method we wont need to restore the state anymore.

review @rafaelfranca @tenderlove @carlosantoniodasilva

[fixes #12566]