Software 43917 Published by

Ruby on Rails version 8.0.3 has been released, featuring numerous improvements and bug fixes across various components of the framework. Key updates include enhancements to Active Support, such as preventing unnecessary reloads and handling collisions in HashWithIndifferentAccess, as well as improvements to Active Record's query cache and transactional tests. Additionally, Action View and Action Pack have received attention, with fixes addressing issues like label prefixing and URL helpers for engines mounted at the application root. 



Ruby on Rails 8.0.3 released

Ruby on Rails version 8.0.3 has been released, bringing numerous improvements and bug fixes to the framework. At its core, Rails is a web application framework that follows the Model-View-Controller (MVC) pattern and includes everything needed to create database-backed web applications.

The changelog highlights several key modifications across various components of the framework:

Active Support

ActiveSupport::FileUpdateChecker has been updated to prevent unnecessary reloads when using time travel test helpers. This ensures that files are only reloaded when necessary, improving overall performance.

Additionally, ActiveSupport::Logger has been made freeze-friendly, allowing it to work seamlessly with frozen strings and objects.

Furthermore, the transform_keys! method in ActiveSupport::HashWithIndifferentAccess has been fixed to handle collisions correctly. This prevents keys from being lost when transforming key-value pairs in a hash.

Active Record

The query cache for pinned connections in multi-threaded transactional tests has been improved. When using a pinned connection across separate threads, each thread now uses a separate cache store, ensuring accuracy of system tests and any test utilizing multiple threads.

Moreover, the has_secure_password validation has been corrected to perform confirmation validation even when the password contains only whitespace characters.

Active Model

The create_or_find_by method will now correctly rollback transactions. Previously, raising an ActiveRecord::Rollback error in an after_save callback had no effect on rolling back the transaction and creating a record.

Action View

Label tags with a specified for option are now correctly prefixed by the form namespace value, ensuring proper naming conventions.

The javascript_include_tag method has been updated to accept either strings or symbols for its type option, allowing for greater flexibility in including JavaScript files.

Action Pack

URL helpers for engines mounted at the application root now handle SCRIPT_NAME correctly, preventing potential issues with path generation.

When calling Rails.application.reload_routes!, it will no longer clear almost all routes. This fix addresses a problem that occurred when running this method inside a middleware of a Rake task in development mode.

Rack and Rack-related

The framework has been updated to address Rack 3.2 deprecation warnings. Specifically, the :unprocessable_entity status code is deprecated and will be replaced by :unprocessable_content.

Active Job and Active Storage

Active Job's retry job instrumentation has been fixed when using the :test adapter.

In addition, a deprecation warning for Aws::S3::Object#upload_stream in ActiveStorage::Service::S3Service has been addressed.

Action Cable and Action Mailer

Action Cable has been updated to fix compatibility with the redis gem 5.4.1, and Action Mailer remains unchanged.

Guides and Railties

The Guides section is empty, indicating that there have been no changes in this area. However, several other components of Rails have received updates, including Railties, which has been fixed to work properly with routes not being loaded.

Lastly, the Rails console has been updated to not override user-defined IRB names, ensuring a seamless experience for users who customize their prompt name in .irbrc.

Rails Release 8.0.3

Active Support ActiveSupport::FileUpdateChecker does not depend on Time.now to prevent unnecessary reloads with time travel test helpers

Release 8.0.3 · rails/rails