We can't find the internet
Attempting to reconnect
Something went wrong!
Hang in there while we get back on track
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.rbto make it more readable and maintainable. The conditional logic has been extracted to a new method calledrequire_parentheses?, replacing the previouspresent?calls. This makes the code easier to understand and work with. -
Enhanced
pluckMethod: TheActiveRecord::Base#pluckmethod 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_suffixinActiveRecord::SchemaDumper: Resolved a bug where theremove_prefix_and_suffixmethod was broken due to an unusedversionargument. 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_detectiontoidle-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 thehas_manymethod. 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
--devflag, 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
MoneyTypeclass toPriceTypefor better clarity and readability. πΈ
Bugfixes
- Fix query_logs_test.rb: Addressed an issue in the
query_logs_test.rbfile to ensure tests run correctly and reliably. π οΈ - Arel SQL Generation for UNION: Fixed generated SQL for
UNIONandUNION ALLinvolvingLIMITorORDER BYby wrappingSELECTstatements 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_browsersetting, 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
INwith subselect to be preparable: You can now use theINoperator 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_formethod. 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
Datewhen running raw queries throughActiveRecord::Base.connection.select_all. Your dates are in good hands! -
Add missing
ostructrequire tohttp_token_authentication_test.rb: We added the missingostructrequire statement to ensure smooth testing. No more errors due to missing libraries! -
Arel: make
Ornodes "Nary" likeAnd: Fixed issue #51386 by restructuringOrnodes to be "Nary" likeAndnodes. This reduces the depth of the tree for largeORconditions, 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! πΈ