Rails

Rails Deprecates return/break in Transactions

Rails has disallowed using return, break and throw for exiting early from a transaction and having it committed.

Rails Relation#pick Uses Loaded Results

Rails ActiveRecord::Relation#pick now uses already loaded results instead of making a new query everytime.

Rails Adds :from/:to to previously_changed?

Rails Active Model Dirty method [attribute_name]_previously_changed? now accepts :from and :to arguments just like [attribute_name]_changed?

Rails Adds Schema Cache Path Configuration

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

Rails Action Cable Adds Stream Unsubscribe

Rails adds ActionCable::Channel#stop_stream_from and ActionCable::Channel#stop_stream_for methods to allow user to unsubscribe from specific stream

Eager Loading Active Storage to Avoid N+1

Removing N+1 queries when we access the Active Storage attachments associated with an ActiveRecord model.

Rails Adds Jitter to ActiveJob retry_on

Rails adds jitter to ActiveJob::Exceptions.retry_on to cater to thundering herd effect

Ruby Hash#transform_keys Accepts Key Mapping

Ruby Hash#transform_keys now also accepts a hash that maps the existing hash keys to new keys

Rails Adds Strict Loading to Prevent Lazy

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

Rails adds config rake_eager_load

Rails has added the option to eager load all the registered name spaces in rake tasks.