Sunday, December 3, 2017

This Week in Rails: Rails 5.2 beta, new PostgreSQL features, preload link and more!

Posted by repinel

Hello everyone! This is Roque bringing you the latest news from the Rails world.

Rails 5.2.0 beta released 🎉

This release includes Active Storage, a new framework provided by Rails to make it easier to upload and process files.

This Week’s Contributors

24 people contributed to Rails the past week! If you’d like to join them, why not check out the list of open issues?

Add support for PostgreSQL operator classes to add_index

The operator classes identify database operators to be used by the index for the columns. You can assign the same operator to all columns, or not. It currently only supports PostgreSQL.

Add ability to create PostgreSQL foreign keys without validation

Normally, PostgresSQL verifies that all rows in a table satisfy its foreign keys constraints. With this option, you can create these constraints without the overhead of checking if they are valid.

The helper creates a link tag with the preload keyword that allows you to basically define resources that pages will need very soon after loading. In addition, Rails will send HTTP2 Early Hints if the proxy server supports it, helping the fetch process.

Prevent Active Record scopes with reserved names

An error will be raised when defining scopes with names already defined by ActiveRecord::Relation instance methods.

That’s it for this week, as always, we couldn’t cover all of the changes, but feel free to check the commits. If you’d like to join them, check out the list of open issues. Until next week!