rails changelog


Here's the latest scoop on what's been happening in the codebase! ๐ŸŽ‰ We've got some shiny new features, improvements, and a few bugfixes to keep everything running smoothly.

New Features

  • Deprecated Associations: We've rolled out support for deprecated associations in the ActiveRecord framework. This includes a shiny new DeprecatedAssociationError class to keep things in check when deprecated associations are referenced. Plus, there's a new configuration option to manage how these associations are handled, whether you want a heads-up or prefer to keep things quiet. ๐Ÿš€
  • Backtrace Cleaner: Say hello to ActiveSupport::BacktraceCleaner#clean_locations. This nifty new method will make your backtrace info cleaner and more readable, helping you debug like a pro! ๐Ÿ•ต๏ธโ€โ™‚๏ธ

Improvements

  • Threading and Code Execution Guide: We've revamped the guide to make it clearer and more useful, adding new content on asynchronous Active Record and CurrentAttributes. Unfortunately, this was later reverted due to accuracy issues, but we're on it! ๐Ÿ“š
  • Public File Server Cache-Control: We've upped our caching game by setting immutable for digested assets and stale-while-revalidate for non-digested files. This means faster load times and less revalidation for your users. ๐Ÿš€
  • Annotate Comments: Annotations now get the spotlight they deserve when using update_all and delete_all. Your comments will stick around, making it easier to track changes in your database. ๐Ÿ“‹

Bugfixes

  • Threading Guide Reversion: We reverted a previous update to the Threading and Code Execution Guide to keep things accurate and reliable. ๐Ÿ› ๏ธ
  • BigDecimal Serializer: Fixed the naming of the use_big_decimal_serializer flag to avoid any head-scratching moments. ๐Ÿค”
  • RDoc Markup: Tweaked some RDoc markup for better readability and clarity in our method documentation. ๐Ÿ“–

Chores

  • CurrentAttributes Naming: Made sure CurrentAttributes is correctly named in the CHANGELOG. Just keeping things tidy! ๐Ÿงน

That's all for now, folks! Keep coding and may your bugs be few and far between! ๐ŸŽˆ

Included Commits

2025-07-01T01:43:56 See commit

This commit addresses a correction in the naming of a configuration flag related to Active Job in Rails. Specifically, it updates the deprecation notice for the flag from use_big_decimal_serialize to use_big_decimal_serializer, ensuring consistency and clarity in the documentation.

The modification is reflected in the release notes, where the correct term is now used. This change not only improves the accuracy of the documentation but also helps developers avoid confusion regarding the configuration option as they transition to newer versions of Rails.

Files changed

  • guides/source/7_2_release_notes.md
2025-07-01T10:45:56 See commit

This commit enhances the default cache-control settings for the public file server to optimize performance in modern web browsers. By marking digested assets as immutable, it ensures that these files are never revalidated, allowing browsers to cache them indefinitely without checking for updates.

Additionally, for non-digested files, the commit introduces the stale-while-revalidate directive. This adjustment permits caching proxies to revalidate these files asynchronously at most once per minute, improving efficiency by reducing the frequency of validation requests. Overall, these changes aim to streamline caching behavior and improve load times for users.

Files changed

2025-07-01T21:06:15 See commit

This commit introduces support for deprecated associations in the ActiveRecord framework. It adds a new error class, DeprecatedAssociationError, to handle instances where deprecated associations are referenced. The implementation includes modifications across several files, such as errors.rb, join_dependency.rb, and reflection.rb, where the code now checks for deprecated associations and raises warnings when they are used in queries or preloading records. Additionally, a configuration option is added to manage how deprecated associations are handled, allowing developers to specify whether to warn or silently ignore these deprecated features.

Furthermore, the commit includes tests for the deprecated associations, exemplified by the addition of a new model in the test suite that defines both a standard and a deprecated association. This enhancement aims to provide clearer guidance to developers regarding the use of deprecated associations, ensuring they are aware of potential issues while maintaining backward compatibility with existing code. Overall, this commit represents a step towards refining the handling of associations in ActiveRecord while promoting best practices and code maintainability.

Files changed

  • activerecord/lib/active_record/associations/errors.rb
  • activerecord/lib/active_record/associations/join_dependency.rb
  • activerecord/lib/active_record/associations/preloader/branch.rb
  • activerecord/lib/active_record/errors.rb
  • activerecord/lib/active_record/nested_attributes.rb
  • activerecord/lib/active_record/railtie.rb
  • activerecord/lib/active_record/reflection.rb
  • activerecord/test/models/dats/bulb.rb
2025-07-02T09:51:01 See commit

This commit addresses a minor correction in the RDoc markup within the active_record/associations.rb file of the ActiveRecord library. Specifically, it modifies the documentation for a method that reports deprecated associations, enhancing the clarity of the text regarding the :backtrace option.

The change involves replacing the plain text reference to :backtrace with a formatted version using RDoc's markup syntax, which improves the readability and presentation of the documentation. This adjustment ensures that users can easily identify the parameter in the context of the documentation, ultimately contributing to better understanding and usability of the code.

Files changed

  • activerecord/lib/active_record/associations.rb
2025-06-27T15:00:37 See commit

The commit introduces the implementation of the ActiveSupport::BacktraceCleaner#clean_locations method. This new functionality is designed to enhance the process of cleaning and formatting backtrace information, making it easier for developers to read and analyze error reports. By improving how backtrace locations are handled, the change aims to streamline debugging efforts and improve overall code maintainability.

Additionally, the commit may include adjustments to existing backtrace handling mechanisms, ensuring consistency and efficiency in the way backtrace data is processed. This enhancement is expected to contribute positively to the developer experience by providing clearer insights into the origins of errors in the application.

Files changed

2025-06-27T17:15:40 See commit

The commit addresses an inconsistency in the naming of the CurrentAttributes class within the CHANGELOG, ensuring that it is correctly referred to in its plural form, ActiveSupport::CurrentAttributes. This change is primarily a documentation update aimed at improving clarity and accuracy in the project's records.

Additionally, the commit includes a note indicating that the continuous integration (CI) process will skip running tests for this change, as it does not affect the functionality of the codebase. Overall, this update enhances the documentation without introducing any new features or modifications to the code itself.

Files changed

2025-06-28T12:38:50 See commit

This commit updates the Threading and Code Execution Guide as part of the Rails Documentation project, enhancing its clarity and usability. Key improvements include refined phrasing, a restructured layout for better flow, and the addition of new content on asynchronous Active Record, Isolated Execution State, and CurrentAttributes. The guide has also had its 'work in progress' label removed, and new examples of wrapped application code have been incorporated.

The modifications were made to two files: documents.yaml and threading_and_code_execution.md, both of which have been updated to reflect the changes. Overall, these updates aim to provide clearer and more comprehensive guidance for users working with threading and code execution in Rails.

Files changed

  • guides/source/documents.yaml
  • guides/source/threading_and_code_execution.md
2025-06-30T06:59:42 See commit

This commit reverts a previous update to the Threading and Code Execution Guide, specifically commit 8ca0f945808c8daf604c3fd9ea278137f86a219d. The decision to revert was made because the rewritten guide was found to be less accurate and, in some instances, misleading.

By undoing the changes, the commit aims to restore the original content of the guide, ensuring that users have access to reliable and precise information regarding threading and code execution.

Files changed

2025-06-30T18:27:22 See commit

This commit addresses an issue where comments added using the annotate feature were not being propagated to the update_all and delete_all methods. By enhancing the functionality, the commit ensures that any annotations made on records will now be preserved and reflected when these bulk operations are performed. This improvement enhances the clarity and traceability of changes made to the database, as developers can now see the context of the updates or deletions directly associated with their respective annotations.

Overall, the changes made in this commit contribute to better code maintainability and readability, allowing developers to retain important metadata during mass record modifications. This ensures that the intent behind the changes is not lost, thereby improving collaboration and understanding among team members working with the database.

Files changed