Skip to content
Write Software, Well
  • Archive
  • About
Sign in Subscribe
Crossroad in the woods to hint Rails Router

Understanding the Rails Router: Why, What, and How

The router is the entry point of your Rails application. It acts as the gatekeeper for all incoming HTTP requests, inspecting and sending them to a controller action; even filtering and rejecting them if necessary. In this article, we’ll do a deep dive into the Rails Router to understand it better.

23 min read

Featured

Crossroad in the woods to hint Rails Router

Understanding the Rails Router: Why, What, and How

23 min read
Akshay's Blog -> Write Software, Well

Akshay's Blog is now Write Software, Well

4 min read
A rack-compliant web application in Ruby

Let's Build a Web Application in Ruby without Rails

Ruby no Rails 10 min read
Books to learn programming with Ruby and Rails

A List of Books to Learn Programming with Ruby and Rails

8 min read
Hotwire Course

Announcing: Crash Course on Turbo (Hotwire) Framework

Announcing the pre-release of an introductory mini-guide for everyone interested in Hotwire and part of a bigger, more comprehensive, paid Hotwire course that I plan to release next year. This course provides a brief introduction to Hotwire with hands-on, practical projects.

4 min read
Custom validation errors in Rails

How to Customize Rails Validation Errors to Remove Leading Attribute Column Names

Rails validations is an elegant way to verify the model state before it's saved into the database. Often, you want to provide a custom, user-friendly error message to the user. In this post, we'll learn how to accomplish this with custom validation methods.

3 min read
Return 404 Not Found in Rails

How to Return 404 Not Found Error in Rails

In this post, we'll learn about the HTTP 404 Not Found error: what it is and how it works, how to return a 404 response from a Rails application with a custom error page, and understand the impact of 404 errors on the SEO for your website or web application.

5 min read
Daniela Baron - Staff Engineer at Fundthrough

Interview with Daniela Baron, Staff Engineer at FundThrough

I recently had the pleasure to interview Daniela Baron, a Ruby and Rails developer and staff engineer at FundThrough, a fintech company based in Toronto. It contains a lot of interesting and thoughtful answers as well as a ton of high-quality recommendations for books and podcasts. Enjoy!

11 min read
Akshay's Blog -> Write Software, Well

Akshay's Blog is now Write Software, Well

This blog is about writing as much as it is about software development. After two years, 130 posts, and hundreds of thousands of readers, the blog has outgrown my personal domain and needs a new home. Welcome to "Write Software, Well".

4 min read
Base64 Encoding and Decoding in Ruby

Base64 Encoding, Explained

Base64 is an elegant way to convert binary data to text, making it easy to store and transport. This article covers the basics of Base64 encoding, including what it is, how it works and why it's important. It also shows how to encode and decode Base64 data in various programming languages.

5 min read
Rails Instrumentation API

Understanding the Instrumentation API in Rails

The Instrumentation API in ActiveSupport serves a dual purpose. You can use it to implement the observer (pub-sub) pattern, as well as benchmark how long it took to execute some action. In this post, we'll learn almost everything you need to know about the Rails Instrumentation API.

Rails Internals 5 min read
When to Use the Length, Size, and Count Methods in Rails

Length, Size, and Count in Ruby and Rails: When to Use Which?

You can use the length, size, and count methods to find the number of elements in a collection. This post explores the difference between these methods and explains how you should choose which method to use according to the needs of your application.

5 min read
Miles Woodroffe, Technical Advisor and Fractional CTO

Interview with Miles Woodroffe, former Global CTO of Cookpad

Miles Woodroffe is a veteran Ruby & Rails developer who served as a Global CTO at Cookpad for many years and represents the company as a founding board member at the Rails Foundation. I recently had the pleasure to interview Miles, and he graciously provided very thoughtful and interesting answers.

8 min read
The Difference Between nil?, empty?, and blank? in Ruby

The Difference Between nil?, empty?, and blank? in Ruby

In Ruby, you can use nil? method to check if the object is nil. However, Ruby also provides empty? and there’s a blank? method in Rails. For a Ruby (or Rails) newbie, it can get quite confusing, it certainly did for me. This post explains which method to use when. Hope it simplifies things a little.

1 min read
DHH's Tweet on Martin Fowler's Refactoring Book

Refactoring: Improving the Design of Existing Code (My Notes and Highlights)

I recently re-read Martin Fowler's excellent book on refactoring. It's about improving the design and quality of your code in small steps, without changing external behavior. The book contains detailed descriptions of refactorings, with motivation, mechanics, and an example for each. A must-read.

10 min read
Enable caching in development mode in Rails

What Happens When You Run Rails dev:cache Command?

You can enable caching in development mode by running the `rails dev:cache` command in terminal. Ever wondered what that command does, and how exactly does it tell Rails to start caching stuff in your application? Let's take a peek behind the curtain to see exactly what's going on.

Rails Internals 2 min read

Page 1 of 12

Load More Something went wrong with loading more posts
  • Sign up
  • Homepage

© 2023 - Write Software, Well