rails changelog


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 41 to 43 of 43 Entries