About:

Akshay Khot is a Ruby and Rails developer spreading the joy of writing software through his blog.

Website:

Specializations:

Interests:

Writing software Ruby Rails

Incoming Links:

Outgoing Links:

Joel Spolsky
Subscribe to RSS:
The post delves into the internals of Active Storage's has_one_attached API in Ruby on Rails, explaining how a single document is attached to a Rails model. It covers the process from the model's DSL declaration to the proxy objec...
The blog post explains the use of the 'direct' method in Rails routing to create custom URL helpers for polymorphic models. It details how to define these helpers, the logic behind generating URLs based on whether an entry is a ne...
Active Storage in Rails enables efficient image transformation through a structured workflow involving lazy processing, variant definitions, and secure URL management.
Rails 8.2's new combined credentials feature streamlines credential management by providing a unified API for accessing both environment variables and encrypted files.
The blog post discusses the use of localhost in web development, highlighting its special treatment by browsers that allows certain APIs to function as if they were on HTTPS. It explains how to use subdomains with localhost for be...
The blog post details the author's journey of rebuilding their blog using Ruby on Rails, focusing on setting up a staging environment with PostgreSQL. It covers the provisioning and configuration of application and database server...
The author plans to rebuild their blog, Write Software, Well, using Ruby on Rails, transitioning from the Ghost platform. They aim to create a more substantial application with features like a course platform, membership area, and...
The post details the process of creating a staging environment for a Ruby on Rails application and deploying it using Kamal. It covers the basics of Rails environments, how to configure a staging environment, and the steps to depl...
The post explains the Active Storage library in Rails, focusing on the concepts of blobs and attachments. A blob represents the metadata of an uploaded file, while an attachment links a blob to a specific model in the application....
The article discusses the importance of sitemaps for SEO, particularly for new websites. It explains what a sitemap is, how to create one in Rails, and how to submit it to Google Search Console for indexing. The author emphasizes ...
The post details the author's journey of rebuilding a blog using Ruby on Rails, starting with the creation of a new Rails project. It covers the necessary installations, the directory structure of a Rails application, and the init...
Rails introduces a bearer_token method to streamline bearer token extraction, enhancing API authentication by reducing boilerplate code and standardizing practices across applications.
The text discusses the author's experience using AI tools like Cursor and ChatGPT in programming. It provides tips for effectively using these tools, such as asking specific, structured questions and breaking large problems into m...
The text explains how to inspect the sequence of controller callbacks in Rails, providing a small trick to inspect the full list of callbacks for a controller. It also covers the basics of initializers and how Rails implements the...
The text provides advice for web developers looking to freelance, suggesting that they target businesses rather than individuals or small shops. It emphasizes the benefits of working with agencies and mid-sized software companies,...
The text discusses the extract_options! method in Rails, which allows for the extraction of options from an array of arguments. It explains the problem it solves, its implementation, and provides real and custom examples of its us...
The article explains how redirects work in Rails, the difference between temporary and permanent redirects, and how to implement redirects manually in Rails. It also discusses the redirect_to helper method, its options, and how it...
The text explains the various ways to use the render method in Rails controller actions, including rendering JSON APIs, partials, custom inline ERB, or raw files. It also covers the default behavior of rendering the action's view,...
The author discusses the underrated value of learning through an experience with QuickBooks and ChatGPT. They describe how they overcame their struggles with bookkeeping and gained new skills through just-in-time learning with the...
The author announces a new newsletter called Business Logic, focusing on topics beyond Ruby on Rails, such as running a software services business, freelancing, AI, hiring, and sharing book notes.
The text discusses serving large files in Rails using a reverse proxy server like Nginx or Thruster. It explains the X-Sendfile pattern, how it works, when to use it, and its benefits. The author shares their experience working on...
The text discusses the issue of N+1 queries in Rails apps and how to fix it using SQL subqueries. It explains the problem, the traditional solution of eager loading, and the more efficient alternative of using subqueries. It provi...
The post discusses how to reduce memory usage in Rails applications by only querying the necessary data from the database. It explains the impact of fetching all columns and provides a simple example to demonstrate the reduction i...
The text discusses the importance of profiling Ruby on Rails applications to identify and fix performance issues. It introduces Rails Debugbar as a profiling tool and provides a step-by-step guide on how to use it to analyze and i...