logo

Ruby on Rails

Advanced ActiveRecord Query Optimization in Rails: From Arel to Raw SQL

ActiveRecord is one of Rails’ greatest strengths — but when your queries get complex or performance becomes critical, knowing how to go beyond the basics is essential. In this article, we’ll explore how to push ActiveRecord to its limits, when to leverage Arel for fine-grained query building, and when raw SQL is the best tool for the job.

Read More
Advanced ActiveRecord Query Optimization in Rails

Sorbet in Rails: Your Bug Radar Before Production Hits

Ruby is expressive, fun, and fast to write. But it's also... wild. With great freedom comes the risk of accidentally breaking things. Sorbet brings some guardrails to your Rails app. It’s a static type checker built just for Ruby — and this post is your beginner-friendly map to using it effectively in a Rails app.

Read More
Sorbet in Rails Blog Banner

A Guide to Using Sidekiq for Background Jobs in Ruby on Rails

As web applications grow, they often need to handle long-running tasks without slowing down user interactions. Sidekiq is a popular choice among Ruby on Rails developers for processing background jobs efficiently. This guide will cover what Sidekiq is, how to set it up in a Rails application, and provide practical examples to illustrate its usage.

Read More
A Guide to Using Sidekiq for Background Jobs in Ruby on Rails

Mastering Cross-Origin Communication with Rack CORS in Rails

Web browsers have a set of rules in place to prevent web pages from accessing resources on different origins without permission. This policy, known as the same-origin policy, ensures that a web page can only access resources that have the same origin as the page itself. However, there are scenarios where web applications need to communicate with other origins for legitimate purposes, such as fetching data from an API or loading web fonts. In such cases, cross-origin resource sharing (CORS) comes into play. In this article, we will explore how to implement CORS in a Rails application and understand its significance.

Read More
Mastering Cross-Origin Communication with Rack CORS in Rails

© 2025 Rohit Bhatt. All rights reserved.