From 9bcf72fc1fa9648fb277a55bb3ba174d6393e9f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafael=20Mendon=C3=A7a=20Fran=C3=A7a?= Date: Fri, 30 Oct 2020 01:25:03 +0000 Subject: [PATCH] Add major features to the 6.1 release notes --- guides/source/6_1_release_notes.md | 32 ++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/guides/source/6_1_release_notes.md b/guides/source/6_1_release_notes.md index 4608558cbb..f13a72498d 100644 --- a/guides/source/6_1_release_notes.md +++ b/guides/source/6_1_release_notes.md @@ -5,6 +5,12 @@ Ruby on Rails 6.1 Release Notes Highlights in Rails 6.1: +* Per-database Connection Switching +* Horizontal Sharding +* Strict Loading Associations +* Delegated Types +* Destroy Associations Async + These release notes cover only the major changes. To learn about various bug fixes and changes, please refer to the change logs or check out the [list of commits](https://github.com/rails/rails/commits/master) in the main Rails @@ -26,6 +32,27 @@ guide. Major Features -------------- +### Per-database Connection Switching + +Rails 6.1 provides you with the ability to [switch connections per-database](https://github.com/rails/rails/pull/40370). In 6.0 if you switched to the `reading` role then all database connections also switched to the reading role. Now in 6.1 if you set `legacy_connection_handling` to `false` in your configuration, Rails will allow you to switch connections for a single database by calling `connected_to` on the corresponding abstract class. + +### Horizontal Sharding + +Rails 6.0 provided the ability to functionally partition (multiple partitions, different schemas) your database but wasn't able to support horizontal sharding (same schema, multiple partitions). Rails wasn't able to support horizonal sharding because models in Active Record could only have one connection per-role per-class. This is now fixed and [horizontal sharding](https://github.com/rails/rails/pull/38531) with Rails is available. + +### Strict Loading Associations + +[Strict loading associations](https://github.com/rails/rails/pull/37400) allows you to ensure that all +your associations are loaded eagerly and stop N+1's before they happen. + +### Delegated Types + +[Delegated Types](https://github.com/rails/rails/pull/39341) is an alternative to single-table inheritance. This is helpful for representing class hierarchies allowing the superclass to be a concrete class that is represented by its own table. Each subclass has its own table for additional attributes. + +### Destroy Associations Async + +[Destroy associations async](https://github.com/rails/rails/pull/40157) adds the ability for applications to `destroy` associations in a background job. This can help you avoid timeouts and other performance issues in your application when destroying data. + Railties -------- @@ -293,6 +320,11 @@ Please refer to the [Changelog][active-model] for detailed changes. ### Notable changes +* Active Model's errors are now objects with an interface that allows your application to more + easily handle and interact with errors thrown by models. + [The feature](https://github.com/rails/rails/pull/32313) includes a query interface, enables + more precise testing, and access to error details. + Active Support --------------