Hello Everyone! This is Roque bringing the latest from Rails with some help from Kasper.
We had 36 awesome contributors to the Rails codebase this week. Check out the active issues over on GitHub if you’d like to see your name here.
There’s new release candidates, please try them and report any regressions you find, so that the Rails team can fix them before the final release.
Thank you to all contributors for these releases!
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.
The matched job returned by these methods can be used for advanced assertions like:
job = assert_enqueued_with(job: SomeJob) do
assert_equal 5, job.arguments.second
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.
You up for that? Tell Godfrey today.