Rails adds support for annotating HTML output with template file names.Rails 6.1 has added support for adding HTML comments to the rendered output indicating where each template begins and ends.
Rails 6.1 supports `if_not_exists` option for adding indexRails 6.1 added support for if_not_exists option to add_index. The if_not_exists provided to create_table also gets propagated to all indexes getting created in the create_table block.
Using Interactors in RailsInteractors provide a common interface for performing complex user interactions.
Rails adds support for descending order in find_each, find_in_batches and in_batchesRails 6.1 has added support for providing order(ASC/DESC) to batch processing methods like find_each, find_in_batches and in_batches instead of processing records in ascending order always.
Rails adds support for db:rollback:name for multiple database applicationsRails has added support for name option while rollbacking migration for multiple database application
Rails 6.1 add Enumerable#pick to complement Relation#pickAdding pick to enumerable will enable us to call pick on loaded relations, unloaded relations, and plain enumerables interchangeably.
Using Optimizer Hints in RailsOptimizer Hints allows us to control the query optimizer of a database system. Rails 6 has added support to provide Optimizer Hints.
Rails ActiveRecord::Relation#pick now uses already loaded resultsRails ActiveRecord::Relation#pick now uses already loaded results instead of making a new query everytime.
Rails [attribute_name]_previously_changed? accepts :from and :to argumentsRails Active Model Dirty method [attribute_name]_previously_changed? now accepts :from and :to arguments just like [attribute_name]_changed?
Rails - Allows to specify schema cache path in database configuration fileRails now exposes a new configuration for specifying the location of the schema cache file. This can be done in database.yml using schema_cache_path key.