Say, a USA and a USSR model employed defensive measures to destroy the other if they we're destroyed. Before they'd keep destroying the other, now they're more peaceful only destroying each other once. Good thing it's a fictional example 😁
Have models with accepts_nested_attributes_for? The macro nestled out an index_errors option, so errors attach to a specific model in the submitted array.
There's comments on the pull request, if you want to improve it further.
While calling count on a has_and_belongs_to_many relationship was correctly counted, amping up the inclusion made threw off the count. Now you can use includes and have things counted correctly again.
Passing an object that responds to to_hash to HashWithIndifferentAccess.new now respects the default values and default proc if any of those are there.
Last week, we incorrectly said this change would raise exceptions. What really happens is delegate now works with block, args or arg if those light your Jack-o'-lantern.
Wrapping Up
That's all for This week in Rails. As always, there are many more changes than we have room to cover here, but feel free to check them out yourself.
Until next time!
Also if you really want to be scared, look yourself in the mirror! Boom, nailed it!