Rails

Rails 7.1 after_discard for ActiveJob

Rails 7.1 introduces the after_discard method, allowing us to run a callback when a job is about to be discarded.

Rails 7.1 AR Transaction Instrumentation

With Rails 7.1, we can subscribe to ActiveRecord transaction events for instrumentation with the help of transaction.active_record.

Rails 7.1 Disallow Foreign Keys Option

With Rails 7.1, we can disable foreign key constraints for the entire application by adding foreign_keys false option to database.yml

Rails 7.1 Readonly Attribute Error

Rails 7.1 now raises an ActiveRecord::ReadonlyAttributeError on assignment to readonly attributes.

Rails 7.1 Multiple Mailer Preview Paths

Rails 7.1 adds support for multiple mailer preview paths, enhancing flexibility and organization by allowing previews across various directories.

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.