rails changelog


We've been busy squashing bugs and making tweaks to keep everything running smoothly. Check out the latest updates:

Bugfixes

  • Render Test Warning: 🚨 Fixed a warning in the render_test file where a literal string was set to be frozen in the future. Now, your code is future-proof and warning-free! 🌟
  • Typo in Configuring Guide: πŸ“ Corrected a sneaky typo in the configuring guide. No more confusionβ€”just clear, accurate instructions to help you set up your systems like a pro! πŸŽ‰

Welcome to the latest update! We've made some significant improvements and fixes to enhance performance, streamline processes, and ensure better reliability. Here's a rundown of what's new and improved:

πŸš€ New Features & Improvements

  • Memory Optimization in Active Record Models: We've removed the unnecessary casting of stale_state to a string to reduce allocations and memory footprint. This change is based on a benchmark that showed a significant number of numeric strings being created, leading to improved memory usage. While this breaks the final assertion of the Rails 6.1 Marshal backward compatibility test, the tradeoff is deemed acceptable for the benefits it brings.

  • Simplified with Method in ActiveRecord::Relation: The WithChain class has been removed, and the with method now directly calls spawn.with!(*args). This change simplifies the code and removes unnecessary complexity, making the codebase more straightforward and easier to understand.

  • Enhanced Debugger Configuration: To prevent runtime overhead and memory bloat, we've added require: "debug/prelude" after the debug Gemfile entry. This allows users to use breakpoint methods like debugger, binding.break, and binding.b without automatically activating the debugger upon requiring the gem. This change aims to improve performance, particularly during CI builds.

πŸ› Bug Fixes

  • Error Handling in ActiveRecord::Relation#with: An error will now be raised when a block is passed to the with method. This prevents unexpected behavior and potential bugs, ensuring developers are alerted to incorrect usage and can correct it accordingly.

  • Proper Loading of ActiveSupport::TestCase: We've fixed an issue where ActiveSupport::TestCase was being loaded too early in the boot process. The configuration is now wrapped in a load hook, ensuring it gets set at the appropriate time and resolving issues with other engines defining load hooks on :active_support_test_case.

  • Assertion Checks in Tests: We've fixed tests in the framework that were missing assertions. A rescue block was added to handle ActiveSupport::RaiseWarnings::WarningError, and a pass statement was added to prevent unnecessary bin files from being generated during app updates. These changes ensure the tests properly check for expected behavior, improving functionality and reliability.

🧹 Chores

  • Ignore Tarball from rake preview_docs: The tarball file will no longer be included or generated when running this rake command. This change streamlines the preview_docs process, excluding unnecessary files and ensuring a cleaner output.

We hope these updates make your development experience smoother and more efficient. Happy coding! πŸš€


Hey there, fabulous devs! πŸŽ‰ We've got some exciting updates and fixes to share with you. Check out the latest changes below:


New Features

  • Create preview tarball from directory: We now create a preview tarball from a directory, making it super easy to share and preview contents. Plus, we've optimized the process by moving artifacts instead of copying them. Less waste, more efficiency! 🌟

  • Support hexBinary format in XML: We've added support for the hexBinary format in XML, allowing you to represent binary data in hexadecimal form. This makes working with binary data in XML documents a breeze! πŸ§™β€β™‚οΈβœ¨

Improvements

  • Allow assertionless tests to be reported: Assertionless tests will now be included in test reports, giving you a more comprehensive view of your test coverage and results. No test left behind! πŸš€

  • Rename method to keep it consistent with others parse versions*: We've renamed a method to maintain consistency with other parse* versions. This ensures uniformity and clarity in our codebase. Consistency is key! πŸ”‘

  • Turn app:update Rake tasks into a Command: The app:update Rake tasks have been refactored into a more organized and modular Command structure. This makes managing and performing updates in your Rails application easier than ever! πŸ› οΈ

Bugfixes

  • Fix Ruby 3.4 internal frame cleaner test: We've fixed an issue with the internal frame cleaner test in Ruby 3.4, ensuring it functions correctly. πŸ›πŸ”§

  • Fix Rake :preview_docs tarball: Addressed an issue that caused a circular reference and resulted in a "tar: .: file changed as we read it" error. The tarball now creates successfully without any errors. πŸ“¦βœ…

  • Skip selenium-webdriver version 4.20.0: We've skipped the installation of selenium-webdriver version 4.20.0 due to the removal of Selenium::WebDriver::DriverFinder.path. This will be restored once the necessary fix is implemented in a future version. πŸš«πŸ•΅οΈβ€β™‚οΈ

Chores

  • Remove outdated comment: Cleaned up the codebase by removing an outdated comment. Keeping things neat and tidy! 🧹

Enjoy the new features and improvements, and keep on coding! πŸš€βœ¨


Here's the latest and greatest update for our project! Check out the cool new features, important fixes, and some clean-up work we've done to keep everything running smoothly. πŸš€


New Features

  • Refactor Code for Clarity: We've refactored the code in activerecord/lib/arel/visitors/to_sql.rb to make it more readable and maintainable. The conditional logic has been extracted to a new method called require_parentheses?, replacing the previous present? calls. This makes the code easier to understand and work with.

  • Enhanced pluck Method: The ActiveRecord::Base#pluck method now accepts hash values as arguments! This means you can use column aliases when retrieving specific columns from a database query, giving you more flexibility and customization options.

Bug Fixes

  • Devcontainer Smoke Test for Forked Repos: Fixed an issue with the devcontainer smoke test for forked repositories. Now, the test won't attempt to push devcontainer images if the repo is a fork, preventing permission errors and ensuring smoother workflow runs.

  • remove_prefix_and_suffix in ActiveRecord::SchemaDumper: Resolved a bug where the remove_prefix_and_suffix method was broken due to an unused version argument. The method now correctly handles table name prefix and suffix options, restoring its intended functionality.

  • Typo in Feature Policy for Idle-Detection: Corrected a typo in the Feature Policy for idle-detection from idle_detection to idle-detection. This fix ensures that browsers can now process the policy correctly, as per MDN documentation.

Improvements

  • Documentation Copy Edit: Made some copy edits to the documentation in activerecord/lib/active_record/associations.rb, specifically for the has_many method. The updates provide clearer guidance on the +:autosave+ option, enhancing readability and accuracy.

Chores

  • Remove Unused Variable in Test: Cleaned up the test file for ActiveRecord migration command recorder by removing an unused variable assignment. This makes the code more concise and easier to read without affecting functionality.

That's all for now! Keep coding and stay awesome! πŸ’»βœ¨


Here's the latest and greatest from our codebase! πŸŽ‰

New Features

  • Workflow for Testing Devcontainer Setup: We've rolled out a shiny new workflow for testing the generated devcontainer setup for new Rails apps. This workflow includes generating a new app with the --dev flag, initializing the dev container, creating a model scaffold, running migrations, and testing. It covers all four supported database configurations to ensure everything works smoothly. πŸš€

Improvements

  • Relative Paths in AR Basics Guide: Updated the Active Record basics guide to use relative paths in code examples. This makes the guide more consistent and user-friendly, especially when using the copy button. πŸ“š
  • ActionCable Redis Config Example: Improved the documentation for setting up the Redis server for ActionCable. The new example is clearer and more concise, making it easier for developers to follow. πŸ“
  • String Keys for SQLCommenter: SQLCommenter now supports string keys, giving you more flexibility and making it easier to customize and use in your projects. πŸ—οΈ
  • Rename MoneyType to PriceType: Renamed the MoneyType class to PriceType for better clarity and readability. πŸ’Έ

Bugfixes

  • Fix query_logs_test.rb: Addressed an issue in the query_logs_test.rb file to ensure tests run correctly and reliably. πŸ› οΈ
  • Arel SQL Generation for UNION: Fixed generated SQL for UNION and UNION ALL involving LIMIT or ORDER BY by wrapping SELECT statements in parentheses. This ensures the SQL is generated correctly. 🧩
  • Respond with 406 for Blocked Browsers: Updated the server response to 406 Not Acceptable for browsers blocked by the allow_browser setting, aligning with RFC 9110 specifications. 🚫

Stay tuned for more updates and happy coding! ✨


Hey there! We've been busy making some awesome improvements and fixing bugs to make your experience even better. Check out the latest updates:


πŸš€ New Features

  • Allow IN with subselect to be preparable: You can now use the IN operator with subselects in a preparable manner. This means your queries can be prepared once and executed multiple times with different values, boosting performance and efficiency. Say goodbye to repetitive parsing and planning!

πŸ› οΈ Improvements

  • Documentation improvement for #fields_for: We've spruced up the documentation for the #fields_for method. Expect clearer explanations and more examples to help you use this method like a pro.

  • Update active_record_querying.md: The ActiveRecord querying documentation just got a major update! We've added more detailed explanations and examples to help you master querying in Ruby on Rails.

πŸ› Bugfixes

  • Add a Date decoder to the pg adapter to type cast dates: Fixed issue #51448 by adding a Date decoder to the pg adapter. Now, date columns will be correctly type cast to Ruby Date when running raw queries through ActiveRecord::Base.connection.select_all. Your dates are in good hands!

  • Add missing ostruct require to http_token_authentication_test.rb: We added the missing ostruct require statement to ensure smooth testing. No more errors due to missing libraries!

  • Arel: make Or nodes "Nary" like And: Fixed issue #51386 by restructuring Or nodes to be "Nary" like And nodes. This reduces the depth of the tree for large OR conditions, making it more efficient. Fun fact: this fix makes SQLite fail with "Expression tree is too large (maximum depth 1000)"β€”talk about a powerful improvement!


Stay tuned for more updates and keep rocking those queries! 🎸

Showing 21 to 26 of 26 Entries