Saturday, June 17, 2017

This Week in Rails: mailer configuration, perf improvement, and bug fixes!

Posted by andatki

Hi there! This is Andy, bringing you another edition of This Week in Rails. Let’s dive in.

🎉 This Week’s Rails contributors! 🎉

We had 23 awesome people who helped make Rails better this week, with 4 first-time contributors! Would you like to help as well? Head over to the 👉 issues list.

New

Allow mailers to configure their delivery job

In some situations, a user may want to configure the delivery job in order to have better control over errors. This adds an option to make that possible.

Perf

Improve performance of mass assignments

This change makes a small improvement to the performance of initializing an ActiveModel instance. The other interesting thing I learned about was the “magic comment” # frozen_string_literal: true. Check the PR for details.

Fixed

Don’t map id to primary key in raw_write_attribute

The hash provided to update_columns is turned into an UPDATE query. Passing an id key resulted in an update to the id column, even if the model uses a different primary key. This fixes that!

Docs

Docs for #delegate_missing_to

A newer feature, now with documentation explaining how and when to use delegate, and delegate_missing_to.

That’s it for this week, as always, we couldn’t cover all of the changes, but feel free to check all the commits from this week.

Until next week! 👋👋