This week Active Record got a new method that works like find_in_batches but yields relations instead of arrays. It also added a cool delegation API that lets you do something like:
People.in_batches.delete_all('age > 21')
Oh, in case you were wondering – this is pretty much how Skynet works.
This patch allows new locale YAML files to be loaded without having to restart the Rails server. It also reloads the available locales when files are deleted.
As usage for XML serialization declined, it's become less of a core concern of Rails. In Rails 5, this feature will be moved to the activemodel-serializers-xml gem.
If you're still using the XML Serialization feature in your app, you will need to add this to your Gemfile when you upgrade.
That's a wrap
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!
Have you been thinking about writing for us, but you're scared of putting yourself out there? Don't worry, you can help our editors improve their writing with thoughtful critique and general grammar policing.