Last active
December 10, 2015 16:08
-
-
Save tatey/4458488 to your computer and use it in GitHub Desktop.
Commit message when I upgraded rails from 2.3.8 to 2.3.9.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Upgrade rails to 2.3.9. | |
| 2.3.9 fixes a bug that we had come to depend on | |
| (https://github.com/rails/rails/pull/7661). It's best described with an | |
| example | |
| 2.3.8 | |
| p = Plan.new | |
| p.member = Member.first | |
| p.contacts << Contact.first | |
| p.plan_contacts # => [] | |
| p.save # => true | |
| 2.3.9 | |
| p = Plan.new | |
| p.member = Member.first | |
| p.contacts << Contact.first | |
| p.plan_contacts # => [#<Contact ...>] | |
| p.save # => RunTimeError | |
| The difference is that `plan_contacts` are being built before the | |
| association is saved. All specs were updated to ensure the plan was | |
| persisted by adding contacts. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment