Happy New Year, Rubyists on Rails! This is Tim here bringing you all the latest in Rails from the Holiday and New Year period. We hope you got to unwind during this time of year (if that is your thing) and are well rested for all that 2018 has to bring. Rails, on the other hand, saw a flurry of activity including many, many bug fixes. So, without further ado.....
Since our last issue, 36 people gave the gift of Pull Request 🎁 to Rails. 6 of those contributed for the very first time! A big thank you to everyone who contributed during a time that is typically reserved for performing upgrades and fixes to extended family members' devices.
Ruby 2.5.0 was released on December 25 2017, bringing many exciting changes. Rails has been confirmed to work with this new Ruby as it has been officially added to its testing matrix.
RailsConf is calling for proposals for its 2018 conference which will be held in Pittsburgh. The deadline is January 19th, so now's the time to get that proposal in!
Bulk ALTER support has existed for MySQL's adapter for many years. This change adds support for the PostgreSQL adapter, meaning that multiple column changes can now be aggregated into a single statement.
This change added support for MiniMagick's combine_options, allowing Active Storage to apply changes like center-weighted cropping that combine multiple options into a single step.
The default behavior for ActiveStorage::Blob#service_url is to use an :inline value for disposition. There are certain distinct content types, however, for which this does not make sense. This change identifies those cases and prevents them from inheriting this default behavior.
Previously, if you called String#blank? on, for example, an UTF-16LE-encoded string, it would raise an Encoding::CompatibilityError expection. It will now return the right thing!
If you had called assert_changes with a to argument, you may have been surprised to find that it was sufficient to match only the resultant value for it to pass, even if nothing changed. This revision fixes that by failing in the event that nothing changed, as would be expected.
Normally if you select a subset of a record's attributes and then try to reference an unselected attribute, you will get a MissingAttributeError. However, if you then save'd the record and called that same attribute, you may be surprised to get nil instead. This revision fixes that by always raising an error.
Wrapping Up
That's it for this week! Even though this was a bumper issue, there were as always many, many more changes I wanted to talk about that I could not list. But you can check them all out here! Until next time....
This Week in Rails · 30 N Racine #200 · Chicago IL 60607 · USA