The new version of Ruby 6 arrives with support for multiple databases

ruby-on-rails 6

Some days ago Ruby on Rails development team released version 6 of the Ruby framework for web applications. This version brings a number of new features and changes highly anticipated by the community.

The main new features in this version of Rails revolve around the processing of incoming emails with Action Mailbox, connecting to various databases, etc. Additionally, Rails now defines Webpack as the default JavaScript package. Ruby 6 was released with a number of highly anticipated features and changes. A number of key features have been added to Rails 6 to enhance your applications and help you save valuable development time.

Ruby on Rails 6 highlights

One of the key features that will be of interest to many great application developers is undoubtedly the support for multiple databases, integrated and ready to use.

This feature allows a single application to easily connect to multiple databases at the same time.

Esto Developers are greatly benefited by simply splitting read / write with replicated databases to improve performance.

According to the development team:

whatever you want to do, there is a new simple API to achieve it. Also, being able to do this in a simple way can save you a lot of time during your application development.

With the arrival of this new version the Action Mailbox feature that allows incoming emails to be routed to a controller is highlighted, like mailboxes to be processed in Rails.

In other words, the Action mailbox allows you to route incoming emails to mailboxes similar to those of a controller.

Action Mailbox includes entries for Mailgun, Mandrill, Postmark and SendGrid. You can also manage incoming emails directly through the built-in Exim, Postfix and Qmail inputs.

Webpack as the default JavaScript package

As the de facto standard with many modern JavaScript frameworks for front-end development, Rails 6 has added Webpack as the default JavaScript package through Webpacker Gem, replacing the Rails portfolio of assets.

This can be seen as a relatively simple addition, but it could go a long way. In other words, Webpack will relieve developers a bit, because the Rails development team said it still uses asset pipelining with Sprockets for CSS and static assets.

According to the team, the two integrate very well and offer the best possible compromise between advanced JavaScript functionality and an approach that just works for other assets.

Action Cable

Another notable feature of this version of Rails is the arrival of the »Action Text» function. which allows you to bring content and rich text editing to Rails.

Includes Trix editor which handles everything from formatting to links to quotes and lists, embedded images and galleries.

Trix is ​​an open source project from Basecamp, the makers of Ruby on Rails. All embedded images (or other attachments) are automatically stored using Active Storage and associated with the included RichText template.

On the other hand, "Action Cable" is one of the most important features that appeared in Rails 5. Action Cable it has been improved in Rails 6 to provide even more performance.

Therefore, the framework development team has indicated that it is now possible to test Action Cable at any level - connections, channels and streams.

Connection tests help you verify that login IDs are assigned correctly or if incorrect login requests are rejected. Channel tests can be written to check if users can subscribe to channels and if the channel has a stream.

Finally Zeitwerk started with the desire to build an autoloader for Rails 6. As such, Zeitwerk is now the new code loader for Ruby. With a conventional file structure, Zeitwerk loads classes and modules on demand, which means you don't have to write mandatory calls for your own files.

If you want to know more about it, you can consult the following link.


Leave a Comment

Your email address will not be published. Required fields are marked with *

*

*

  1. Responsible for the data: Miguel Ángel Gatón
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.