Rails 6.1 adds rescue_from to ActionCable::Connection::BaseThe `rescue_from` on ActionCable::Connection::Base allows us to intercept unhandled exceptions
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.
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 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.
Rails 6.1 adds ActionCable::Channel#stream_or_reject_forRails 6.1 adds `ActionCable::Channel#stream_or_reject_for` to stream or reject connection based on presence of record
Rails has deprecated using return, break and throw to exit a transactionRails has disallowed using return, break and throw for exiting early from a transaction and having it committed.
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 has added support in Action Cable to unsubscribe from specific streamRails adds ActionCable::Channel#stop_stream_from and ActionCable::Channel#stop_stream_for methods to allow user to unsubscribe from specific stream
Rails has added strict loading mode to prevent lazy loadingRails has added strict loading mode to prevent lazy loading of associations and help avoid N + 1 queries