This Week in Rails: jQuery no longer part of Rails and more!

Posted by chancancode, December 3, 2016 @ 12:00 am in News

Hello everyone!

Prathamesh and Greg here, bringing you all the latest from This Week in Rails…..
Which is actually “Past 2 weeks in Rails” because we missed to send last week’s issue due to illness. But we are back now, so let’s see what happened in the Rails world since the last issue.

This week’s Rails contributors

The past 2 weeks 38 awesome people contributed to Rails. Want to be part of the show? Head to the issues list and make a contribution!

jQuery is no longer a dependency of Rails

The Rails javascript helpers has been rewritten in a new gem called rails-ujs and they use vanilla javascript, so jQuery is not a dependency of Rails anymore.

Rails 5.0.1.rc1 has been released!

The first release candidate for 5.0.1 has been released and if no issues found, the final will be release on the 6th of December.

Improved

form_with helper to unify form_tag and form_for

The form_for and form_tag helpers serve a very similar use-case so they been unified with the new form_with helper.

Make the second argument to attribute optional

A default for the cast_type option of the attribute method has been added to enable calling this method with just the attribute name.

Active Record connections improvement

Active Record distributed the connection to previously blocked threads on when it cleared the reloadable connections, but with this change the same happens on disconnect too.

Use gen_random_uuid() for PostgreSQL >= 9.4

With this change, Active Record uses the recommended UUID function depending on the underlying PostgreSQL server’s version, while maintaining uuid_generate_v4() in older migrations.

New

Add Yarn support in new apps using –yarn option by Liceth · Pull Request #26836 · rails/rails · GitHub

yarn, the javascript package manager is supported in Rails now! You can pass the –yarn option when you generate a new rails app and Rails will create the necessary config files and run yarn install after bundle install automatically.

Introduce reload\_ reader for singular associations

This patch introduced _Model#reload__ to bring back force reloading of the association reader.

Fixed

update_all and delete_all is fixed when chained with left_joins

These batch methods didn’t use the left outer joins before, but with this fix they behave properly now.

Fix a force ssl redirection bug

This PR fixes a bug with the force ssl redirection when the session_store is disabled.

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!