Skip to content

Instantly share code, notes, and snippets.

@tatey
Last active December 10, 2015 16:08
Show Gist options
  • Select an option

  • Save tatey/4458488 to your computer and use it in GitHub Desktop.

Select an option

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.
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