Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
[Regression 3.2 -> 4.0] Fix bugs with changed attributes tracking when transaction gets rollback #13166
The most common scenario to demonstrate the bug:
assert !model.approved? Topic.transaction do model.approved = true model.save! raise ActiveRecord::Rollback end model.save! assert @first.reload.approved
In the last
I've made a 4 different scenarios in test cases to be sure my patch covers everything. If you would consider some of them an overkill please just let me know.