Friday, November 4, 2016

This Week in Rails: better Active Record methods and more!

Posted by repinel

Hello everyone! This is Roque bringing latest news from the Rails community. Stay tuned!

This Week’s Rails Contributors

This week 22 people contributed to Rails. We also got 6 first time contributors. Welcome aboard folks and keep it going!

Improved

Deprecate the behavior of ActiveRecord::Dirty in callbacks

The behavior of Dirty methods inside of after_(create|update|save) callbacks will be changing in the next version of Rails. Click here to check out the API details.

Allow Active Record slice to take an array of methods

No more having to expand an array with * when passing it to the slice method of a model. Something like user.slice(keys) will Just Work™.

Fixed

Fix the issue with duration of time varying for DST changes

Previously, ActiveSupport::Duration.parse would try to be consistent across DST boundaries, and either the duration would be shorter or longer depending on the time of year. Now it uses an absolute reference point in UTC that is not subject to DST transitions.

Remove Active Record tasks from bin scripts if it is skipped

bin/setup and bin/update will no longer include db:setup and db:migrate if Active Record is skipped in the application.

Wrapping up

That’s it from This Week in Rails! There were many other great contributions, too numerous to list here, but feel free to check them out!

Until next week!