rails changelog


Here's a delightful peek into the latest and greatest updates! 🎉

New feature: Active Job Continuation isolated steps
Unleash the power of isolation! Steps in Active Job Continuation can now be marked as isolated, ensuring they run in their own job execution. This is perfect for those long-running tasks where you want to save progress before the action unfolds. No more infinite loops; just smooth, isolated operations! 🚀

Improvement: Respect user-configured IRB.conf[:IRB_NAME]
Rails now plays nice with your custom IRB configurations! If you've set your own IRB_NAME, Rails will respect your choice, only setting it when it's not the default. It's all about keeping your environment just the way you like it. 🎨

Improvement: Enhance concurrent unsubscribe_from_channel test
ActionCable's testing just got a boost! The unsubscribe_from_channel method now undergoes more realistic concurrent testing, complete with customizable unsubscribe latency. This means more reliable and robust handling of concurrent operations. 💪

Improvement: ActiveSupport::BacktraceCleaner#first_clean_frame
Debugging just got easier! With the new first_clean_frame method, you can quickly pinpoint the origin of errors in your backtrace. It's all about making error tracking a breeze. 🔍

New feature: ActiveSupport::BacktraceCleaner#first_clean_location
Introducing first_clean_location—your new best friend for error reporting! This feature helps you swiftly identify the first cleaned location in a backtrace, streamlining the debugging process. 🛠️

Bugfix: Address TestERBTemplate test failure with Ruby 3.5.0dev
No more test failures with Ruby 3.5.0dev! We've updated the TestERBTemplate to accommodate the new backtrace format, ensuring smooth sailing across Ruby versions. 🐛

Bugfix: Fix typo in with_recursive example
A little typo correction goes a long way! The with_recursive example is now typo-free, making it clearer and easier to follow. 📝

Bugfix: Fix typo in The Request and Response Objects
Documentation polish alert! We've tidied up a minor typo in the Action Controller overview, ensuring everything reads perfectly. 📚

Enjoy these updates and keep on coding with a smile! 😄

Included Commits

2025-06-20T03:34:17 See commit

The commit addresses a typo found in the example code for the with_recursive feature. This correction enhances the clarity and accuracy of the documentation, ensuring that users can better understand and implement the feature without confusion. Such improvements are essential for maintaining high-quality documentation and preventing potential misunderstandings for developers referencing the example.

Files changed

2025-06-20T17:35:06 See commit

This commit addresses an issue where Rails was overriding the user's configured IRB_NAME in their IRB settings. By ensuring that IRB_NAME is only set when it differs from the default value, the change aligns its behavior with how PROMPT_MODE is handled. This enhancement respects user preferences and provides a more consistent experience for those utilizing custom IRB configurations.

Overall, the update improves user customization in the Rails environment by preventing unnecessary overrides, thereby allowing users to maintain their desired IRB settings without interference from the framework.

Files changed

2025-06-21T21:15:44 See commit

The commit introduces the first_clean_frame method to the ActiveSupport::BacktraceCleaner class. This method is designed to enhance backtrace handling by identifying and returning the first frame in a backtrace that has been cleaned, allowing developers to more easily pinpoint the origin of errors in their applications.

Additionally, the implementation likely involves updating the existing backtrace cleaning logic to accommodate this new functionality, ensuring that it integrates seamlessly with the current framework. Overall, this enhancement aims to improve error tracking and debugging processes within the ActiveSupport library.

Files changed

2025-06-22T10:32:12 See commit

The recent commit enhances the concurrent testing of the unsubscribe_from_channel method within the ActionCable framework. The test case has been modified to better simulate concurrent execution by introducing a TestConnection with a specific unsubscribe_latency. This adjustment allows for more realistic testing conditions, as it increases the likelihood of overlapping operations between unsubscribing from a channel and streaming from it. The implementation now employs threads to manage these concurrent actions, ensuring that both operations can be tested without raising a RuntimeError, which would indicate a failure in handling concurrency.

Additionally, the SuccessAdapter class has been updated to include an unsubscribe_latency attribute, allowing for customizable delays during the unsubscribe process. This change not only improves the robustness of the tests but also enhances the overall reliability of the ActionCable subscription handling by ensuring that it can gracefully manage concurrent operations. The cleanup process at the end of the test has also been refined to ensure that all threads are properly terminated, further contributing to the test's stability.

Files changed

  • actioncable/test/channel/stream_test.rb
  • actioncable/test/stubs/test_adapter.rb
2025-06-22T17:51:39 See commit

This commit addresses a minor typographical error in the documentation for the Request and Response Objects within the Action Controller overview. Specifically, it corrects the phrase where the word "an" was mistakenly duplicated before "instance" in the explanation of the response method.

The changes made include the deletion of the redundant "an" and a slight adjustment to ensure clarity in the description of the request and response methods, which are essential for accessing the respective request and response objects in the current request cycle. Overall, this fix enhances the readability and professionalism of the documentation.

Files changed

  • guides/source/action_controller_overview.md
2025-06-23T15:28:04 See commit

The commit introduces the first_clean_location method to the ActiveSupport::BacktraceCleaner class. This new method enhances the functionality of backtrace cleaning by providing a way to retrieve the first cleaned location from a backtrace. This improvement aims to streamline error reporting and debugging processes by allowing developers to quickly identify the initial point of failure in their code.

Additionally, the commit likely includes updates to the existing backtrace cleaning logic to accommodate this new feature, ensuring that it integrates seamlessly with the current system. Overall, this enhancement contributes to better error handling and clarity in tracing issues within applications using ActiveSupport.

Files changed

2025-06-25T00:39:31 See commit

This commit resolves a test failure in the TestERBTemplate related to Ruby version 3.5.0dev, specifically the test case test_argument_error_in_the_template_is_not_hijacked_by_strict_locals_checking. The failure occurred due to a change in the error backtrace format introduced in Ruby 3.5.0dev, which now includes the context name in the backtrace output. This change caused the original assertion in the test to fail, as it expected a different format for the error message.

To fix this issue, the commit modifies the test to accommodate the new backtrace format by updating the regular expression used in the assertion. The changes ensure that the test correctly matches the expected error message structure across different Ruby versions, thereby preventing any false negatives in the test results. The commit also references relevant discussions and changes in the Ruby repository that led to this adjustment.

Files changed

2025-06-25T18:06:26 See commit

The commit introduces an "isolated" option for steps in Active Job Continuation, defaulting to false. This feature allows specific steps to run in their own job execution, which is particularly useful for long-running tasks where progress needs to be saved before execution. The mechanism interrupts the job before executing a step if it is not the first step and either the current or the previous step is marked as isolated. This ensures that initial steps run inline, preventing infinite loops of interruptions.

The changes include modifications to the continuable.rb and continuation.rb files to implement the new isolated functionality, as well as updates to logging for better traceability of job interruptions. Additionally, tests were added to verify the correct behavior of isolated steps, ensuring they execute separately and log the appropriate messages when interrupted. Overall, this enhancement improves the robustness of job execution in scenarios where certain steps require isolation for effective progress tracking.

Files changed

  • activejob/lib/active_job/continuable.rb
  • activejob/lib/active_job/continuation.rb
  • activejob/lib/active_job/log_subscriber.rb
  • activejob/test/cases/continuation_test.rb