Friday, March 24, 2017

This Week in Rails: 5.1.0.rc1, GSoC and more!

Posted by repinel

Hello everyone! This is Roque bringing the latest from the last two weeks.

The last couple of weeks have been very busy with the releasing of Rails 5.1.0.rc1 and the starting of Rails 5.2 🎉

Congratulations to all involved!!

Rails 5.1.0.rc1 has been released!

Please check it out and help the community by reporting issues before 5.1 is released.

If you are already using encrypted secrets, make sure to run this script to upgrade your app.

Google Summer of Code 2017

Are you a student, or know someone who would love to contribute to Rails? Our GSoC students application is now open! Check out our ideas page and join us on the mailing list for discussion.

The RailsConf 2017 schedule is live!

Have you also been waiting for this? No more. The schedule is live and looks awesome!

New

Add default option to belongs_to

The :default option adds a before_validation callback that initializes the association with the given lambda’s return value:
belongs_to :person, default: -> {​ Current.person }​

Add support to duplicable Rational and Complex

This is a work ahead of the upcoming Ruby changes.

Fixed

Allow Time#to_time on frozen objects

This fixes an issue with frozen that has been around since Rails 4.

Allow order to be given expressions as hash keys

The Active Record order method is no longer restricted to attribute names. It now accepts expressions like:
Post.order(“LENGTH(title)” => :asc).last

There were many other great pull requests this week from 45 contributors, including 8 first-timers. Thank you all!

Until next week!