Software 43854 Published by

Ruby on Rails 8.1.0 has been released with numerous updates aimed at improving its functionality, usability, and performance. The release includes changes such as removing deprecated methods, preserving system local time when using the to_time method, and enhancements to testing, Active Support, ActiveRecord, PostgreSQL, Action View, and Action Pack. These updates aim to improve the overall performance and maintainability of Rails applications, making them more efficient and secure. Additionally, several new features have been added, including support for multiple databases, parallel test databases, and improved error handling in PostgreSQL.



Ruby on Rails 8.1.0 released

The latest release of Ruby on Rails, 8.1.0, has introduced a multitude of changes aimed at improving its functionality, usability, and overall performance. Among these updates is the removal of deprecated methods to ensure cleaner code and avoid potential issues. Additionally, support for preserving system local time when using the to_time method has been added.

As a full-stack framework, Rails empowers developers to build complex web applications that span both the front-end and back-end. With its comprehensive toolset, Rails enables features such as rendering HTML templates, updating databases in real-time, sending and receiving emails, maintaining live pages through WebSockets, enqueuing jobs for asynchronous work, storing uploads in cloud services, and providing robust security protections against common attacks.

In terms of testing, several enhancements have been made to improve the overall functionality and usability of Rails applications. The Event Reporter has been unified, enabling event reporters to produce structured events more effectively. This feature also supports adding tags to events and improves state management for CurrentAttributes and ExecutionContext in test cases.

Another area that has seen significant updates is ActiveSupport::BacktraceCleaner. This module has been updated with various new features, including the ability to clear CurrentAttributes instances after requests are completed, skip creating parallel testing databases, reduce cache key sizes from 250 bytes to 2000 bytes, report all exceptions, and allow the freeze_time testing helper to accept a date or time argument.

ActiveRecord has also undergone substantial changes, with several updates aimed at improving its performance, usability, and functionality. Some of the notable improvements include optimizing PostgreSQL batching, reducing memory allocation by 45x and bandwidth usage by 900x, adding support for multiple databases, enabling passing retryable SQL literals to where clauses, setting default values for primary keys in insert_all and upsert_all, and adding a load hook for ActiveRecord::DatabaseConfigurations.

PostgreSQL has introduced several improvements to improve its performance and maintainability. These updates include showing specific error messages when exclusion constraints are broken, hiding sensitive information based on certain attributes and parameters, checking the isolation level of the current transaction, and making sure nested transactions return the isolation level of the parent transaction.

Action View has been updated to improve readability, including structured events for Action View, fixed labels, and features like fetchpriority, CSP nonce, and method: options. Additionally, relative time in words helpers have been introduced to create dom_id-like strings from an unlimited number of objects.

Furthermore, several other improvements have been made to Active Record, including the use of _N as a parallel test database suffix, the ability to reset cache counters for multiple records, and the addition of affected rows to SQL Active Record notifications. Transactional tests per database have also been added, allowing test classes to override default settings for individual databases.

Action Pack has also undergone several updates aimed at improving its functionality and usability. Some of the notable improvements include submitting test requests using as: :html with Content-Type: x-www-form-urlencoded, adding link-local IP ranges to ActionDispatch::RemoteIp default proxies, ignoring IPs in X-Forwarded-For headers when accompanied by port information, engine route filtering, better formatting in bin/rails routes, and URL helpers for engines mounted at the application root handling SCRIPT_NAME correctly.

Rails/Rails Release 8.1.0

Active Support Remove deprecated passing a Time object to Time#since. Rafael Mendonça França Remove deprecated Benchmark.ms method. It is now defined in the benchmark gem.

Release 8.1.0 · rails/rails