Rails

Rails 7.1 Logs Job Enqueue Callers

Rails 7.1 ActiveJob logs background job enqueue callers with backtraces, showing the file and line number where jobs are triggered.

Rails Ignore Counter Cache on Backfill

With Rails 7.2, we can now ignore counter cache columns during backfilling, allowing faster execution by reducing N+1 queries from counter cache column updates.

Rails 7.1 Composite Key Batch Ordering

Rails 7.1 adds multi-column ordering support for composite primary keys in find_each, find_in_batches, and in_batches methods.

Rails 7.1 *_deliver Mailer Callbacks

With Rails 7.1, we can hook into the lifecycle of email delivery with the help of ActionMailer before_deliver, around_deliver and after_deliver callbacks.

Sidekiq To SolidQueue Migration

Migrating the Miru app from Sidekiq to SolidQueue eliminated the dependency on Redis, reducing costs by utilizing database for job storage.

What Is New In Rails 7.2: Key Features

Rails 7.2 has just been released, packed with a range of exciting updates that enhance the Rails development experience.

Rails Warns On Tests Without Assertions.

With Rails 7.2, `ActiveSupport::TestCase` now warns when tests do not run any assertions.

Rails in_order_of Filter Option

Rails added the filter option to in_order_of to prioritize the specified values without filtering the results

Rails 7.1 Composite Primary Key Support

ActiveRecord models can now be configured with composite primary keys, making it easier to work with complex data models.

Rails 7.2 Adds Support For Devcontainer.

In Rails 7.2, use `--devcontainer` flag with `rails new` to add a devcontainer to new apps and run `bin/rails devcontainer` for existing apps.