rails/rails — pull request #6420 by chancancode (2012-05-21 08:14:10+00:00)
Title: Restore frozen state on rollback, fixes #6417 (for master)

This is exactly the diff from #6419, applied to master.

When saving a frozen? record, active record would raise an exception to complain about the frozen attributes, rollback the transaction. However, it also has the side effect of unfreezing the record after the rollback. This behaviour is undesirable and incorrect (saving a frozen? record twice in a roll would fail for the first time and succeed in the second time). This patch fixes the bug by explicitly restoring the frozen? state after a rollback.