Rails 5.0.4 has been released

Hi everyone,

I am happy to announce that Rails 5.0.4 has been released.

CHANGES since 5.0.3

To view the changes for each gem, please read the changelogs on GitHub:

Full listing

To see the full list of changes, check out all the commits on GitHub.

SHA-256

If you’d like to verify that your gem is the same as the one I’ve uploaded, please use these SHA-256 hashes.

Here are the checksums for 5.0.4:

$ shasum -a 256 *-5.0.4.gem
f296d82b6494bc6591963f2cd91a08f6853f3ce9b784ab8a6bada5588ceee280  actioncable-5.0.4.gem
31cb0ca3654c4b9423480fd5b43dec6740c3c234195b50c9906745587ed8c6cc  actionmailer-5.0.4.gem
22e48ed14a49ef76278fa249035aaf2fb1d8a9abc649444a2510a94ffba3d7e3  actionpack-5.0.4.gem
f5b53d280c894afd423be26ffc7546266fd6490c91f7e0e3c2dd6524d8d3dbcb  actionview-5.0.4.gem
65997364e723bf8b041172cb5562da08181d45bbed8d04d9516dc8b6672e1d7f  activejob-5.0.4.gem
6145ae036d43b5b19c91c1d8c8936d06b475f17bf8a255919ce4afb6015d7216  activemodel-5.0.4.gem
d82ba1b3519e50c509e0da488f224e5a6164633ebd3c00053e55ade49a8a3d6b  activerecord-5.0.4.gem
ec3af21ed8df9fdd20d9b9c9a8bef3fc3b7d8b69bcb15a7dbdf8f37072bf2c23  activesupport-5.0.4.gem
956e9bd0acf86701b139432eb3c9e6bc6d2f51e7cccec9a5dcf9c7d3cb14d87d  rails-5.0.4.gem
534fbe66df5f7a8c4e2926e7497a7b876f1d34e33b56238db29faf159ad778dc  railties-5.0.4.gem

As always, huge thanks to the many contributors who helped with this release.

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

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! 👋👋

Rails 5.0.4.rc1 has been released

Hi everyone,

I am happy to announce that Rails 5.0.4.rc1 has been released.

If no regressions are found, expect the final release on Monday, June 19, 2017. If you find one, please open an issue on GitHub and mention me (@rafaelfranca) on it, so that we can fix it before the final release.

CHANGES since 5.0.3

To view the changes for each gem, please read the changelogs on GitHub:

Full listing

To see the full list of changes, check out all the commits on GitHub.

SHA-256

If you’d like to verify that your gem is the same as the one I’ve uploaded, please use these SHA-256 hashes.

Here are the checksums for 5.0.4.rc1:

$ shasum -a 256 *-5.0.4.rc1.gem
c99354a6392225b29f01f2c0c73d27cd641a247298871640eeee032d1e6d9f58  actioncable-5.0.4.rc1.gem
07698e6e34e4d4c848cf6b13ea5555c7fa7904c8b6bc2583c9675e19ba91fda8  actionmailer-5.0.4.rc1.gem
828705ee694b5818ec06f05405223ce2f396aa23156e1084a02f0fac9ded2d9d  actionpack-5.0.4.rc1.gem
c8f07e7f26dd86467be877e17f637b76770ee571dd858e037995754ae38dbcd7  actionview-5.0.4.rc1.gem
6cf499ce3625be2f9ef8d998885651cee88335767311b6652bca3f1c271161a9  activejob-5.0.4.rc1.gem
147ec420d4e88fec7b10edb2efb404c563b0551230fc5e930f5c9fe627520c81  activemodel-5.0.4.rc1.gem
bc8f9aa699f31e5642a14afc3566f6744ad93ac80454306cba986ad530923c08  activerecord-5.0.4.rc1.gem
95fa2d6d89dec776faabc2878eb6334884455ff6836daaceaf2e7de3f3f07c64  activesupport-5.0.4.rc1.gem
44843943d4fc377d589bbead59fb74b5bb82e2ab9d1c160fe8884cac6bc17c17  rails-5.0.4.rc1.gem
95785e5e333e2db554e10e733069db1a3cd0d3137f63ec180491082c8b8afa71  railties-5.0.4.rc1.gem

As always, huge thanks to the many contributors who helped with this release.

Rails 4.2.9.rc1 has been released!

Hi everyone,

I am happy to announce that Rails 4.2.9.rc1 has been released.

This is going to be the last bug fix release of the 4.2 series, so please test this release candidate.

If no regressions are found, expect the final release on Monday, June 19, 2017. If you find one, please open an issue on GitHub and mention me (@rafaelfranca) on it, so that we can fix it before the final release.

CHANGES since 4.2.8

To view the changes for each gem, please read the changelogs on GitHub:

Full listing

To see the full list of changes, check out all the commits on GitHub.

SHA-256

If you’d like to verify that your gem is the same as the one I’ve uploaded, please use these SHA-256 hashes.

Here are the checksums for 4.2.9.rc1:

$ shasum -a 256 *-4.2.9.rc1.gem
f989619bd008bb131ac51c9523a67cf07b04fd02ccbb6a4c862a7e91399abf29  actionmailer-4.2.9.rc1.gem
ce36a4c32d738bdf0f225c427ed7e31c2e681004fa827f7bbe0c4bd05fb6b264  actionpack-4.2.9.rc1.gem
e815d4d9ee866145cf9ae78716fed8453a12eace055f4fbd80ae7f4b74e08d27  actionview-4.2.9.rc1.gem
b03d68ecc055160bc903055649bb47b57de09b68749bd6e40e2e4378cd9a3ce7  activejob-4.2.9.rc1.gem
734e28fff15f3319be32b6e3cba40519e7c730c88ba49f0b334eb1d63f32c872  activemodel-4.2.9.rc1.gem
a2f25b8132cca325bf855d7e45c809a122282d8e65f3d6580e40da624c71996a  activerecord-4.2.9.rc1.gem
7b3b69479110a64f50ac53681f076b5ec21a073b1120c9d7ab201eec0af09d12  activesupport-4.2.9.rc1.gem
c7de4f0e62498acf407928a5f147a9e297a63e900882f627489e91b033026b69  rails-4.2.9.rc1.gem
425e43203b35fa28dd9708848c4aaa11706c53fcd75819228a92e6893653f8da  railties-4.2.9.rc1.gem

As always, huge thanks to the many contributors who helped with this release.

This Week in Rails: default option for mattr_accessor, write_multi and more!

Hello everyone! Prathamesh here bringing you the latest news from the Rails world. Let’s get started 🚅

🎉 This Week’s Rails contributors! 🎉

We had 21 awesome people who helped make Rails better this week. Two of them contributed for the first time ever! Would you like to help as well? Head over to the 👉 issues list.

New

💪 mattr_accessor gets the default option 💪

Followup to adding the default option to the class_attribute macro, it is now added to mattr_accessor family of methods as well.

It can be used as follows:

mattr_accessor :always_write_cookie, default: false

💪 Write multiple cache entries at once with write_multi 💪

A new method write_multi has been added to the cache stores which writes multiple cache entries at once.

For eg.

Rails.cache.write_multi foo: ‘bar’, baz: ‘qux’ The default implementation just calls write_entry one by one for each entry but specific cache stores can override this behavior as per their ability of doing bulk writes.

Fixed

⚡️ Generate field ids in collection_check_boxes and collection_radio_buttons ⚡️

This change fixes an issue with collection checkboxes and radio boxes where clicking on the labels was not selecting the options because the input elements did not have proper id attribute with respect to their labels.

✨ Fix partial cache logging getting attributed to wrong partials ✨

This commit fixes an issue with the cache hit/miss log markers being applied to wrong partials.

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! 👋👋

This Week in Rails: class_attribute default, mini_racer and more!

Hello everyone! This is Roque bringing you the latest news from the Rails world.

This Week’s Rails contributors!

We had 32 people who helped make Rails better this week. Three of them contributed for the first time ever! If you would like to help out, check the issues list.

Allow a default value to be declared for class_attribute

Rails will now make it easier to set default values to class attributes like class_attribute :timeout, default: 5

Replace therubyracer with mini_racer

New apps generated with JavaScript and Sprockets support will use mini_racer for the Ruby platform. A faster and more reliable interpreter.

New

Add previous and next day of week API to Active Support

The methods prev_occurring and next_occurring expect a day of the week and return the appropriate value based on the DateTime, e.g. DateTime.now.prev_occurring(:monday).

Fixed

Fix number_to_human round calculation

This fix a regression introduced in Rails 5, where a case like number_to_human(1_000_000, units: { unit: 'meter', thousand: 'kilometer' }) would return "1" instead of "1000 kilometer".

Fix pluralization of uncountable expressions when given a locale

Previously, methods like pluralize and singularize would only use the English uncountable rules rather then the ones for the locale that was passed.

Rename primary key index from rename_table

Formerly, rename_table would only rename primary key index if the column’s data type was sequential. Tables with primary keys with types like UUID would still keep the old name.

Improved

Allow additional options for poltergeist or capybara-webkit in System Tests

If using poltergeist or capybara-webkit, driven_by will register it as the driver and set additional options passed via :options param.

Please refer to drivers documentation to learn what options can be passed.

That’s it for this week, as always, we couldn’t cover all of the changes, but feel free to check the commits if you are interested. Until next week!

This Week in Rails: ActiveSupport::CurrentAttributes, AEAD and more!

Hi there!

This is Vipul bringing you all the latest news about Rails from the hopefully ending summer here in Pune🔥

This Week’s Rails contributors!

We had 36 people who helped make Rails better this week.
Six of them contributed for the first time ever!
If you would like to help out, check the issues list.

New

ActiveSupport::CurrentAttributes provides a thread-isolated attributes singleton

If you’ve used current_user from Devise, you’ve already come across what CurrentAttributes partly provides, but wait there’s more!

Using CurrentAttributes you can start using per request variables that are accessible across the whole system like Models, Controllers, Views, during a Rails request cycle.

For example you can start using attributes like current_user, account, etc, and much more that your system might need without passing them all around to different methods.

AEAD encrypted cookies and sessions

Encrypted cookies now use AES-GCM which couples authentication and encryption in one faster step and produces shorter ciphertexts.

Older cookies encrypted using AES in CBC HMAC mode will be seamlessly upgraded when this new mode is enabled via the action_dispatch.use_authenticated_cookie_encryption configuration value.

Fixed

Make secrets:edit run secrets:setup if it hasn’t already.

On a new app, if you did rails secrets:edit before you’ve called rails secrets:setup, Rails would throw an error.

With this addition, Rails takes care of doing that for you if not already done.

Fix regression in Numericality validator

This change fixes a regression in Numericality validator where extra decimal places on a user input for a decimal column were ignored by numerically validations, for example when comparing 9.18 vs 9.179. 

Improved

Active Record initialization optimizations

Rails had a performance regression from 4.2x to 5.0 where initialization of records slowed down by factor of 2x in some cases.

This change optimizes initializations to improve by a factor of 2x for STI models and 1.3x for non-STI models

That’s it for this week, as always, we couldn’t cover all of the changes, but feel free to check the commits if you are interested.
Until next week!

This Week in Rails: Recycled cache keys and more!

Hi there! This is Greg with the latest news about Rails!

This Week’s Rails contributors!

22 person worked on making Rails better this week. Big thanks to them!
If you want to be a part of that, check the issues list!

New

Recyclable cache keys

With this change Rails, will be able to recycle the cache keys and if you have big volume cache write, your cache space will be better utilised.

Fixed

Allow irb options to be passed from rails console command

Pre Rails 5, the rails console accepted irb options, but a change in Rails 5 break that feature. Now it is fixed, so you can pass the options like this:  rails c – –simple-prompt.

Improved

Respect SchemaDumper.ignore_tables in databases structure dump

This change makes Active Record respect the ignored tables if you configured any.

Don’t cache locally if unless_exist was passed

If your cache backend supports the unless_exist option, you can configure Rails to delete the local cache and read the correct value from the backend.

That’s it for this week, as always, we couldn’t cover all of the changes, but feel free to check the commits if you are interested.
Until next week!

Rails 5.0.3 and 5.1.1 have been released!

Oh hi! This is an announcement to let you all know that versions 5.0.3 and 5.1.1 of Ruby on Rails have been released! These are just regular bugfix releases, so no need to rush to upgrade. I mean, please do upgrade since upgrading is good and you don’t want to get behind, but I mean no need to spend your weekend on these.

I’ve put the gem checksums below and links to the changelogs (check the P.S. at the end of this post if you are going to read the changelog) in each gem.

Have a happy Friday, and a good weekend!

Sincerely,

Tenderlove <3<3<3

Rails 5.0.3

You can find all commits here.

Each changelog is linked below:

Gem checksums:

[aaron@TC release]$ md5sum *5.0.3*
8483a3a00f088b4547cf14dab42f8a5a  actioncable-5.0.3.gem
37f6c2c5ce8f55e748f0f0aac36d0eec  actionmailer-5.0.3.gem
67682c3d3521ca9cc6cf8fcb5e56de36  actionpack-5.0.3.gem
e05b98378b4b9d9546937666d74d9a47  actionview-5.0.3.gem
fd4f09f31026b93ced652c1eb7f229a4  activejob-5.0.3.gem
e6a82b789fb3a6dd9ba5386752ebc41d  activemodel-5.0.3.gem
c284eccf8bc0a883b84180ef6ae3b8f3  activerecord-5.0.3.gem
831f53dad2ce7bada156eb60eb2de1b8  activesupport-5.0.3.gem
f96cecf57f4e2c6897890d59fb5b432b  rails-5.0.3.gem
d48d6b66a34965a4f21d29e7454b6cc9  railties-5.0.3.gem
[aaron@TC release]$

Rails 5.1.1

You can find all commits here.

Each changelog is linked below:

Gem checksums:

[aaron@TC release]$ md5sum *5.1.1*
0670ea1078b0eb5a071cb00dba362e51  actioncable-5.1.1.gem
b0c225597533d862ec85a70b9abda4bc  actionmailer-5.1.1.gem
1e4c682e911ad6df7b33e2077ef63662  actionpack-5.1.1.gem
61c4ca576e49885e5270b8265eb3c55a  actionview-5.1.1.gem
9bc455e2b86a6c2b3b6e47ef8032a7b3  activejob-5.1.1.gem
e5852e43acd79a23e40aec7d3acfd2b3  activemodel-5.1.1.gem
29b6459c5d8f91d418f48a8341ba033d  activerecord-5.1.1.gem
cba3e9e7fc431ff2c7241777b63f6a85  activesupport-5.1.1.gem
6b201afebf14372a3ff021030e9a5138  rails-5.1.1.gem
242a56fe64ce6563996386233bc86d5c  railties-5.1.1.gem
[aaron@TC release]$

P.S.

This is really embarassing, and I’m really sorry, but I forgot to update the version numbers in the changelogs before doing the release. So if you click a link to a changelog, and the top of it says the previous version (5.0.2 or 5.1.0) it means there are no changes to that gem, and that I am not so good at my job of releasing gems. Again, I’m really sorry about this!

Google Summer of Code 2017 Students

We are super excited to announce our accepted Google Summer of Code students for 2017. Welcome Marko and Assain! They will hack on Rails for the summer.

Marko Bogdanović

Marko will be implementing and improving long running benchmarks for Ruby and Rails. He will be mentored by Jon, Robin and Noah.

Assain Jaleel

Assain is going to refresh the cookie system in Rails. He’ll be mentored by Kasper with help from Michael Coyne.

Thank You

We’d like to shout-out to everyone who participated in this year’s selection process – both students and mentors. Let’s have a great summer, all!