Skip to content
Write Software, Well
  • Services
  • Books
  • LinkedIn
  • Archive
  • About
Sign in Subscribe

Method Shorthand in Ruby

While reading the docs, I learned that Ruby (3.0 and up) provides a shorthand syntax for one-line methods, similar to computed properties in C#

1 min read
Array Inquiry in Rails

Array Inquiry in Rails

The ArrayInquirer class provided by the Active Support framework in Rails provides a readable way to check the contents of an array. This post explores how you can implement this using metaprogramming in Ruby.

2 min read

How to Check If Value Exists in an Array in Ruby (and Rails)

In this post, we'll learn two different ways to check if a value is included in an Array.

1 min read
rails notes command

Tracking TODO and FIXME Comments with Rails Notes Command

This post shows how you can use the notes command in Rails to search through your codebase for comments starting with a specific keyword. By default, it searches the codebase for FIXME, OPTIMIZE, and TODO comments, but you can also configure it to use custom keywords.

1 min read

What Happens When You Call render? Let's Understand the Rails Rendering Process

This article explains the Rails rendering process in the context of returning JSON data from the controller. Hopefully, it will make it clear what really happens when you call the render method from the controller.

Rails Internals 7 min read

Regular Expressions in Ruby

Regular expressions can be both terribly awkward and extremely useful. In this introductory post, we will learn the basics of regular expressions in Ruby programming language and how to use them for routine programming tasks.

4 min read
To-do List

Let's Learn Ruby on Rails + Hotwire by Building a To-Do List

In this article, we'll learn Ruby on Rails and Hotwire by building a to-do list from scratch. It shows how to build single-page web applications using traditional web architecture (server-rendered HTML), without the complexity of modern JavaScript frameworks like React.

Hotwire 25 min read
Undo generate scaffold command in Rails

How to Undo Generate Scaffold Command in Rails

Rails offers the convenient `rails destroy` command to undo the effects of any `rails generate` command. Also, don't forget to rollback the migration, if you have already applied it.

2 min read
Different forms of the self keyword

How self Keyword Works in Ruby

Ruby's self keyword can be pretty confusing to understand, especially if you're new to Ruby. Not understanding it often leads to subtle programming bugs that can be difficult to debug. This post explains how it works under common, everyday situations.

Ruby Gems 2 min read
Setting Up Development Environment for Rails

Setting Up Development Environment for Rails

This is the second article in the series on building awesome web applications with Ruby on Rails. It shows how to set up a kick-ass development environment for building Rails apps.

5 min read
Define new routes using member and collection blocks

Define Custom Routes Using the Member and Collection Blocks in Rails

Let's say you want to add non-resourceful custom routes on your controller. Most often, you're better off by introducing a new resourceful controller. However, in those cases where you absolutely have to, you can define new routes using the member and collection blocks provided by the Rails router.

4 min read
How &:method Shortcut Works in Ruby

How &:method Shortcut Works in Ruby

This post shows you how Ruby's `&:method` shortcut works behind the scenes. It's a clever trick that was added first in ActiveSupport and became an official feature in Ruby 1.8.7.

2 min read

Page 13 of 17

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

© Write Software, Well 2025 - Powered by Ghost