Major Features: A list of things to observe when upgrading to Ruby on Rails 6.1.3:
Multiple database support:
Per-database Connection Switching: Rails 6.1.3 provides the ability to switch connections per database. In 6.0 while switching to the reading role, all the database connections are also switched to the reading role. But in the latest update, Rails allows switching connections for a single database by calling connected_to on the identical abstract class.
Horizontal Sharding: The latest update grants the ability to functionally partition, eg: multiple partitions, different schemas, and the database. Earlier Rails was not able to support horizontal sharding because models in Active Record could only hold one connection per role per class. This has now been fixed in the latest update and horizontal sharding with Rails is now available.
Webpack as a default bundler
Live reloading using webpack-dev-server: Webpacker creates a file bin/webpack-dev-server which can be utilized for live reloading in the development phase. You are required to run the webpack-dev-server separately and then live reloading and hot module replacement can be seen in action.
In zeitwerk mode, Rails utilizes Zeitwerk internally to reload, autoload, and eager load. Rails instantiate and configure a dedicated Zeitwerk case that manages the project. The autoloading zeitwerk mode is enabled by default in Rails 6.1.3 applications.
Action Mailbox enables you to route the incoming emails to controller-like mailboxes. The inbound emails can be routed asynchronously to one or various dedicated mailboxes, which can interact directly with the rest of your domain model.
Action Text adds rich text content and editing to Ruby on Rails. It involves the Trix editor that handles everything starting from formatting to links, quotes, lists, embedded images, and galleries. This rich text content generated by the Trix editor is saved in its own RichText model that is associated with the existing Active Record model. Any embedded images or attachments can be automatically stored using Active Storage.
Parallel Testing helps to parallelize the test suite. Forking processes are the default method and threading is supported as well. Running tests in parallel reduces the run time required for the entire test suite to run.
Action Cable Testing:
Action Cable testing tools help to test the Action Cable functionality at any level like- connections, broadcasts, and channels.
No changes have been made in the Action Cable functionality in the recent update.
The key features added to Ruby on Rails 6.1.3 offer outlines of how they can make your applications better, thereby saving your valuable development time. If you are thinking of updating to the new Ruby on Rails 6.1.3, it is better to be aware of the changes this new update provides. Now experience a better functionality and improved framework on Ruby on Rails with Cryptex Technologies.
Cryptex Technologies is a Web design and Web development company based in Nagpur offering all kinds of web and app development solutions on Ruby on Rails to our clients in India and outside. The Cryptex Technologies team is dedicated to developing strong framework solutions based on the client's requirements. Their ability to implement ideas and concepts in a fast and cost-effective way is what makes both clients and developers feel happy about the end result.