BusinessTodd here with your weekly briefing of all the goings-on in the Rails organization.
Since our last update, a number of initiatives were undertaken by many of our stakeholders to breed cross-functional synergies between the underlying components of the Rails vertical. Or, if your eyes glazed over at the sight of "cross-functional synergies" or any of the other garbage I just typed out, a bunch of people did some stuff to make Rails better and junk.
yawn
I'm running this meeting and I'm already boring myself. Let's just jump into it, shall we?
Formerly, Action Cable would raise a connection reset error if a client forcibly disconnected. This change avoids the exception by simply closing the connection if the client disappears.
When running rails app:update, we should avoid adding dependencies on new gems. A previous change adds an option to dev environment config that would require the listen gem to be installed. Instead, the generator now adds the line in question as a comment.
Active Record's strict mode has traditionally overridden MySQL's default modes. However, keeping these modes in place offers better compatibility with other databases. In Rails 5, Active Record will stop overwriting these defaults.
To avoid rounding to incorrect values when coercing a Float to a Decimal, the scale needs to be applied before precision. Be sure to read the entire commit message for a summary of how the existing behavior may cause unexpected issues.
request.reset_session relies on ActionDispatch::Flash, which is not included in API Controllers. This change moves that requirement to the Flash middleware itself.
Calling ActiveModel::Errors#include? with a key that didn't exist would pollute the errors hash with they specified key and an empty Array as its value. This week, that behavior was corrected.
Wrapping Up
That's all for This week in Rails. As always, there are plenty of things we're not able to cover here, so take a look at the changes yourself.