rails changelog


Here's the latest scoop on some fab updates and tweaks that have been made to improve our system. Buckle up and enjoy the ride! 🚀

  • New feature: 🎉 Introducing the Cache#read_counter and Cache#write_counter methods! These nifty little additions to the Cache class are here to help you keep tabs on how often your cache is getting read and written to. This means you can now optimize your caching strategies and boost your application's efficiency with ease. More insights, more power! 💪

  • New feature: Say hello to the must-understand directive! 🧐 This new addition ensures that critical information is fully comprehended by the receiving party, reducing the risk of any mix-ups. It's all about clear communication and keeping everyone on the same page. Let's make data handling and interoperability a breeze! 📊

  • New feature: ActiveRecord just got a whole lot cooler with the new with_default_isolation_level feature! 🎉 You can now set and retrieve a default isolation level for database connections. This enhancement is all about giving you the flexibility to manage database concurrency and consistency like a pro. Get ready for smoother transactions! 💾

  • Improvement: 🍪 Rails now calculates cookie size just like browsers do, by including the cookie name in the length calculation. This tweak ensures your cookies stay within the 4KB limit, keeping everything running smoothly and error-free. Sweet!

  • Improvement: Function aliases in Active Record are now retryable! 🔄 We've revamped the way Function#as works, so you can enjoy more reliable query retries. This change also clears up some old code suggestions, making everything cleaner and more efficient. Cheers to that!

  • Improvement: 🚦 We've switched to using HTTP status code 303 for redirects in the destroy action. This means after deleting a resource, users will be smoothly redirected to a new page without any accidental re-submissions. It's all about making navigation intuitive and user-friendly!

  • Chore: 📚 Active Storage documentation has been updated to reflect Vips as the default variant processor. This change highlights the transition and its benefits, ensuring that users have the latest info at their fingertips. Docs are key, folks!

  • Bugfix: 🐞 A pesky typo in the Action Controller Overview guide has been squashed! This fix ensures that our documentation remains top-notch and crystal clear for all you awesome developers out there.

  • Bugfix: 📝 Spelling errors in Markdown and Ruby files have been corrected, ensuring everything reads just right. Attention to detail is what we're all about, keeping our codebase and documentation in tip-top shape!

That's all for now, folks! Keep an eye out for more updates and happy coding! 🎈

Included Commits

2025-04-01T11:30:03 See commit

In this commit, the code has been updated to use HTTP status code 303 for redirects in the destroy action of the application. This change ensures that after a resource is successfully deleted, the client is instructed to perform a GET request to a different URL, rather than re-submitting the delete request. This is particularly useful for preventing unintended actions when users refresh the page after deletion.

The update enhances the overall user experience by providing a clearer navigation flow and adhering to RESTful principles. By implementing the 303 status code, the application improves its handling of resource deletion and subsequent redirects, making it more intuitive and robust.

Files changed

2025-04-01T15:20:05 See commit

This commit updates the documentation for Active Storage to reflect that Vips is now the default variant processor, a change that was implemented in a previous pull request (https://github.com/rails/rails/pull/42744). The update emphasizes the transition from the previous default processor to Vips, highlighting its advantages and encouraging users to adopt it for processing image variants in their applications.

Additionally, the commit includes a note to skip continuous integration checks, indicating that the changes are purely documentation-related and do not affect the codebase's functionality. This ensures that the documentation remains accurate and up-to-date, providing users with the necessary information to utilize the new default processor effectively.

Files changed

2025-04-01T19:17:51 See commit

This commit addresses a spelling correction in the documentation and code comments within the ActiveSupport library. Specifically, it corrects the word "preceeded" to "preceded" in the CHANGELOG.md file, ensuring the accuracy of the text related to a bug fix in the ERB::Util.tokenize method.

Overall, the changes made in this commit are minor but contribute to maintaining the quality and professionalism of the project's documentation and codebase. Such attention to detail is important for clarity and understanding among developers and users alike.

Files changed

  • activesupport/CHANGELOG.md
2025-04-02T00:07:29 See commit

The recent commit introduces two new methods to the Cache class: Cache#read_counter and Cache#write_counter. These methods are designed to track the number of read and write operations performed on the cache, enhancing the ability to monitor cache usage and performance.

By implementing these counters, developers can gain insights into how frequently the cache is accessed and updated, which can be valuable for optimizing caching strategies and improving overall application efficiency. This addition aims to provide better analytics and debugging capabilities for developers working with caching mechanisms.

Files changed

2025-04-03T07:48:36 See commit

The commit introduces a new method called default_isolation_level to the NullPool class in the ActiveRecord connection adapters. This method is designed to provide a default isolation level, although its implementation is currently a placeholder that raises a NotImplementedError if the setter method is called. The change involves minor modifications to the existing code, including the addition of 7 lines and the removal of 2, while ensuring the NullConfig class remains unchanged in functionality.

Overall, this update enhances the NullPool class by defining a structure for handling isolation levels, even if the actual functionality is not yet implemented. This could be a preparatory step for future enhancements related to database connection management and isolation levels within ActiveRecord.

Files changed

  • activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb
2025-03-28T06:11:12 See commit

This commit addresses an issue with function aliases in Active Record that previously rendered queries non-retryable due to the behavior of Function#as, which wrapped aliases in a non-retryable SqlLiteral. To resolve this, the commit proposes either modifying Function#as to mimic the behavior of AliasPredication, allowing for retries on all queries, or removing Function#as altogether in favor of using AliasPredication#as. The latter approach is favored as it simplifies the code by returning the Function wrapped in an Alias, ensuring that the return value is utilized correctly.

Additionally, this change resolves a long-standing FIXME in the code that recommended eliminating the custom Function#as in favor of Alias nodes. While there was a suggestion to have Function inherit from Unary, this was deemed impractical due to the nature of SQL functions potentially accepting multiple parameters, thus maintaining the current superclass structure. Overall, the commit enhances the functionality and reliability of handling function aliases in query retries within Active Record.

Files changed

2025-03-28T13:42:33 See commit

The commit addresses a typographical error found in the Action Controller Overview guide. The correction enhances the clarity and professionalism of the documentation, ensuring that readers receive accurate information. By fixing this typo, the commit contributes to the overall quality and reliability of the guide, which is essential for users seeking to understand the Action Controller framework.

This minor yet important update reflects a commitment to maintaining high standards in documentation, ultimately aiding developers in their use of the framework.

Files changed

2025-03-29T12:19:55 See commit

This commit introduces the must-understand directive, enhancing the system's ability to manage critical information processing. By implementing this directive, the system ensures that certain essential elements must be comprehended by the receiving party, thereby promoting clearer communication and reducing the risk of misinterpretation.

The addition of the must-understand directive aligns with best practices in data handling and interoperability, reinforcing the importance of explicit acknowledgment of key components in messages. This change aims to improve the robustness of interactions within the system, ensuring that all parties are aligned on crucial data requirements.

Files changed

2025-03-30T01:14:31 See commit

This commit introduces a new feature in ActiveRecord that allows the setting and retrieval of a default isolation level for database connections. It adds two methods, default_isolation_level and default_isolation_level=, to the ConnectionPool class in the ActiveRecord library. These methods utilize ActiveSupport::IsolatedExecutionState to store and manage the default isolation level associated with a specific database configuration.

The implementation enhances the flexibility of ActiveRecord by enabling developers to specify a default isolation level for transactions, which can be particularly useful in managing database concurrency and consistency. The changes involve 10 lines of code additions without any deletions, indicating a straightforward enhancement to the existing functionality.

Files changed

  • activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb
2025-03-31T14:28:07 See commit

This commit modifies the Rails framework to align with browser behavior regarding cookie size validation. Specifically, it incorporates the length of the cookie name into the overall length calculation, which includes both the name and the content of the cookie. This change ensures that cookies adhere to the 4KB size limit that browsers enforce, enhancing compatibility and preventing potential issues related to cookie storage.

By implementing this adjustment, Rails ensures that developers have a more accurate representation of cookie size limitations, ultimately leading to fewer errors and improved functionality in web applications that rely on cookies for state management and user sessions.

Files changed