Tips on Building Your Own SaaS
Practical insights, lessons learned, and actionable advice for SaaS developers
How to Send Tailwindcss-Styled Emails With Ruby on Rails 7
Let me show you how I create beautiful email templates in just a few minutes and how I use them in my Rails projects.
More Articles
How to Install Bootstrap in Rails 7
With the introduction of the Ruby on Rails 7 asset pipeline, there are a lot of new tools available for you to use. But ...
A Quick and Easy Guide to the Asset Pipeline in Rails 7
Rails 7 ships with a new way of handling assets, which seems so confusing that you might wonder if it's a feature....
Is ViewComponent the Future of Rails?
What is a Ruby on Rails Component, and how is it different than a React Component...
Turbo Frames Vs. Turbo Streams
Let's go over the differences between Turbo Frames and Turbo Streams....
The Factory Method Pattern in Ruby
The Factory Method allows you to isolate conditional instantiations so that when you do need to change them, you'll make...
The Builder Pattern in Ruby
The Builder pattern allows you to hide the configuration of complex objects in a separate class....
The Abstract Factory Pattern in Ruby
The Abstract Factory pattern allows you to isolate conditional instantiations of related objects so that your client cod...
The Decorator Pattern in Ruby
The Decorator pattern allows you to attach new behavior to individual objects dynamically without affecting their classe...
The Adapter Pattern in Ruby
The Adapter pattern allows you to make incompatible objects work well together by using an adapter object....
The Strategy Pattern in Ruby
In this post we're going to take a look at how the Strategy Pattern works in Ruby....
Symbols vs. Strings in Ruby
If you're curious, as I was, about which one to choose, or why there are both available, or which one is better, then ke...
Hash vs. Dictionary
The Ruby Hash is an implementation of the dictionary concept, where the keys (in the key, value pair) are unique numbers...
What is Type-Driven Design/Development in Ruby
Type Driven Development and Ruby might sound like apples and oranges but it's actually very useful....
How to Use Strings in Ruby
I remember when I first heard about strings. I wanted to create a command line application that would ask the user for h...
How to Use the Ruby Map Method
I think it’s so cool that the Ruby map method exists. It means that Ruby has support for higher-order functions, and fun...
How to Test Ruby Modules With Rspec
When you have a module that you include in other classes, the way you test it might not be obvious. This is what I'm goi...
Let vs. Let! vs. Instance Variables in RSpec
A common source of confusion when using RSpec is whether to use let, let!, or an instance variable, for storing state. I...
If vs. Unless in Ruby
Do you find unless to be confusing? I know I do. Especially if it’s combined with one or more boolean operators....
Ruby's Sort and Sort_by
The Ruby sort method works by comparing elements of a collection through the spaceship operator, and using the quicksort...
Why You Too Should Learn Elixir
Learn Elixir not because you will get a better job out of it, but because learning functional programming will make you ...
What Is a Ruby Reducer?
The term comes from the world of functional programming, and it’s often paired with map. You’ve probably heard the term ...
Learn How to Use Ruby Arrays in Less Than 10 Minutes
Arrays are probably the most popular data structure you’re going to use in Ruby. Learn what you can do with them and how...
How to Use the Each Method in Ruby
When it comes to doing the same thing over and over again, Ruby has a few methods you can choose from. But in this artic...
What Is Ruby Used For?
If you hang out in any of the web development communities, there’s no way you don’t hear about the Ruby programming lang...
Understanding Boolean Operator Precedence in Ruby (&&, and, ||, or)
Operator precedence might be one of the most confusing parts of the Ruby language. Even the docs recommend you just use ...
How To Learn Ruby
I first stumbled upon Ruby in 2007. All I wanted back then, was a language that I can build something cool with. I was g...
How to Write a Case Expression in Ruby
Ruby uses the case for writing switch statements. Learn how case works and how you can use it....
Ruby’s attr_accessor, attr_reader and attr_writer
A Ruby object has its methods public by default, but its data is private. So if you need to access the data, for either ...
Is Ruby pass-by-reference or pass-by-value?
As you learn your way through Ruby's OOP, you will eventually stumble upon the concept of object passing. It might not b...
Object-Oriented Programming (OOP) with Ruby
Learn about Object-Oriented Programming (OOP) with Ruby, and become a better Ruby developer....
What Is a Ruby Enumerable and Why Would You Use It?
The Ruby Enumerable module deserves the top spot in the popularity contest. It packs so many great methods that it’s har...
Feature Tests vs. Integration Tests vs. Unit Tests
Learn the difference about the many different types of tests in Ruby on Rails and when to use each one....
How To Remove Argument Order Dependency In Ruby
Removing dependencies leads to code that is easier to extend. In this article you're going to learn about removing argum...
How To Avoid The Ruby Class Variable Problem
The way Ruby resolves class variables is not very intuitive and in my opinion, it's one of the few areas where it breaks...
Writing a Chrome extension with Elm
In my quest for learning a new language I've picked Elm and Elixir, I think both are great languages to learn but for th...
How to test a function that yields a block with Minitest and Rspec
Have you ever tried writing a test for a function that takes a block and does something to that block? I recently had to...
How to write a Cucumber test for Google Maps
Trying to write a Cucumer test for a Google Maps related feature is a bit trickier than you might expect. It involves tw...
Understanding and extending Rails form helpers
Helpers in rails are meant to clean up view code by allowing you to extract data processing logic from your markup code....
Nested trees with Ruby on Rails
Did you ever needed to get the children's children of a newsted tree like structure? Well it turns out, in Rails, that s...
Decoupling CSS Selectors From Your Tests
For a long time, I've been bothered by the problem of using CSS selectors to target DOM elements in my tests (with Capyb...
7 Steps To Better Cucumber Tests
When you are starting out with rails testing there are so many things you need to learn about and thus it’s very hard to...
What You Need to Know When Working With External APIs in Rails
Accessing APIs seems to be pretty straight forward, until you actually do it. There are a few gotchas that I'd like to t...
The Beginner’s Guide to Rails Helpers
Helpers in Rails are used to extract complex logic out of the view so that you can organize our code better....
Mastering Ruby Blocks in Less Than 5 Minutes
Ruby blocks are one of the most powerful but confusing topics when it comes to learning how to code with ruby. Let's put...
How to Use link_to in Rails
Even after 7 years of using Ruby on Rails I still have trouble remembering how to properly use all those options availab...
3 Ways of Testing Private Methods In Rails
Here's a topic that pops up often especially when faced with the common task of testing controllers in Rails. We have so...
How to Test Controllers in Rails
These days it seems like everyone is looking for faster tests and for good reason since loading the entire Rails framewo...
How I Create a New Ruby on Rails Project
This is the process I use to create a new Ruby on Rails project. I usually use the latest stable version of Ruby/Rails a...