Monday, November 30, 2020

New Active Record and Action View capabilities, bug fixes and more!

Posted by andyatkinson

Hello! Andy here, highlighting some of the contributions to Ruby on Rails over the last week. Let’s dive in!

Add where.associated to check association presence

The Changelog covers how to use where.associated to check for the presence of an association. This also mirrors where.missing.

Include stylesheets, JS and ERB in stats

With this change, stats from the app/views and app/assets/stylesheets directories are now included with rails stats.

Add support for eager loading all rich text associations

Add the with_all_rich_text method to eager load all rich text associations on a model at once.

Bugfix: Preserve application time zone with travel_to

When parsing a time value as a string with travel_to, preserve the application’s time zone.

Transform Hash into HTML attributes for ERB

This change adds a new method to create HTML attributes from a Ruby Hash. Check the Changelog for an example.

We’re thankful for the contributions from 21 people to Rails over the last week. Have a look at the open issues and become a contributor. Until next time!