Rails-6-1

Rails 6.1 adds rescue_from to ActionCable::Connection::Base

The `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 index

Rails 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_batches

Rails 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#pick

Adding 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_for

Rails 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 transaction

Rails 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 arguments

Rails 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 stream

Rails 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 loading

Rails has added strict loading mode to prevent lazy loading of associations and help avoid N + 1 queries