####
tap tap
Is this thing on?
Hey, everyone! Welcome to the latest edition of This Week in Rails - your one stop shop for all the goings-on in the Rails universe. My name is Todd and I’ll be your guide. Let’s get this party started!
We had 41 extraordinary people commit to Rails this past week, including 15 (!) newcomers. Wanna see your name on this list? Check out the list of issues.
Exposes an equality comparison method (==
) for comparing ActiveRecord::AttributeSet
objects to each other.
Have you ever changed the format for a mailer preview, made a code change, and reloaded the preview only to have the desired format change back to the default? How annoying! This change utilizes JavaScript’s history.pushState
to persist your desired format across refreshes. Nifty!
This patch conditionally skips an expensive method call unless it’s explicitly required when calling preload
on an ActiveRecord::Relation
. The net benefit is an overall reduction in allocated objects and ~40% increase in speed.
This brings Active Job’s assert_enqueued_jobs
into parity with assert_performed_jobs
. Specifically, the :only
option now accepts Array
s.
A regression in 4.2.3 would cause the relative_url_root
and script_name
to each be included in routes for mounted Engines (the expected behavior is for one, not both to be used). This patch resolves that issue on master and 4-2-stable.
Fixes an issue where the at:
argument wouldn’t be cast properly for assert_enqueued_with
and assert_performed_with
, causing tests to fail.
pk_and_sequence_for
is not used by MySQL adapters and is being removed. There won’t be a deprecation cycle for this change, so note that your implementation may break if you’re overriding this method anywhere.
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.
Until next time!