Rails
Rails 7.2 Adds app:update Task to be a Rails Command.
The app:update task to be a Rails command, and adds the --force flag to it, to allow running bin/rails app:update while accepting all the changes it makes.Rails Add ActiveRecord.after_all_transactions_commit Callback
ActiveRecord.after_all_transactions_commit ensures specified actions execute only after all database transactions commit, ensuring reliable post-transaction operations.Rails Adds ActiveRecord::Base.with_connection To Optimize Database Operations.
Efficiently manages database connections by promptly returning them to the pool after use, enabling immediate reuse rather than holding onto connections until the end of the request cycle.BatchEnumerator#destroy_all To Return The Total Number Of Destroyed Records
Rails 7.2 enhances the BatchEnumerator#destroy_all to return the count of destroyed records, eliminating the need for additional queries to determine the number of affected rows.ActiveStorage::Blob#compose Now Supports Custom Blob Key in Rails 7.2.
Rails 7.2 allows to add custom blob key in the ActiveStorage::Blob APIsActiveRecord::Relation#order Adds Support For Hash Values In Rails 7.2.
With Rails 7.2, ActiveRecord::Relation#order supports hash values where keys are table name, value is a hash of key (column name) and value (order direction).PostgreSQL Adapter Now Decodes Columns Of Type Date To Date Instead Of String In Rails 7.2.
Rails 7.2 added a Date decoder to the postgres adapter to type cast dates at the connection level to type cast columns of type date to Ruby Date instead of String.Strict Loading Using :n_plus_one_only Mode Does Not Eagerly Load Child Associations In Rails 7.2.
In Rails 7.2, with strict loading in :n_plus_one_only mode, associations are eagerly loaded and child associations are lazy loaded.Rails 8 adds Kamal by default.
All new applications using Rails 8 will have Kamal by default.Enhancing Data Integrity With validate_foreign_key In Rails
validate_foreign_key validates foreign key constraint and is designed to reduce the impact of adding foreign keys on high-traffic tables in PostgreSQL.