Rails

Rails support bulk insert/upsert on relation

Rails 6.1 has added support for bulk insert/upsert on relation to preserve scope values.

Rails Parameters each_pair/each_value

Rails ActionController::Parameters each_pair and each_value now returns an enumerator when provided without a block.

Rails 6.1 Adds Signed IDs to Active Record

Rails 6.1 added support for signed ids which are a tamper-proof way of identifying a bearer

Rails 6 perform_enqueued_jobs Without Block

With Rails 6, we can use ActiveJob::TestCase#perform_enqueued_jobs without a block to perform jobs in tests

Rails 6.1 Adds rescue_from to ActionCable

The `rescue_from` on ActionCable::Connection::Base allows us to intercept unhandled exceptions

Rails Adds HTML Template Annotations

Rails 6.1 has added support for adding HTML comments to the rendered output indicating where each template begins and ends.

Rails 6.1 Adds if_not_exists for Indexes

Rails 6.1 adds if_not_exists option to add_index, propagating from create_table to indexes in the same block.

Using Interactors in Rails Applications

Interactors provide a common interface for performing complex user interactions.

Ways for reducing Heroku slug size

Techniques for reducing Heroku slug size for Rails applications

Rails Adds Descending Order to Batch Methods

Rails 6.1 adds order option to find_each, find_in_batches, and in_batches for ascending or descending processing.