Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Restore frozen state on rollback, fixes #6417 #6420
My first patch for rails!
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.
added a commit
this pull request
May 22, 2012
@drogus Thanks for the merge <3<3<3
Is this a valid candidate for a 3-2-stable backport? If so, should I apply the patch to 3-2-stable and open a separate pull request? I was trying to look up the rules/workflow for that but I couldn't seem to find that anywhere. If you can briefly explain it I could update the guides via docrails.
@chancancode yes, please open pull request. Basically, the general rule is that we can backport bugfixes and security fixes. Backports are sometimes skipped, especially if it's hard to backport and issue is not critical. There are no strict rules about this mostly because it depends on specific cases and on contributors - sometimes there is no interest in backporting a fix.