Sign up for my newsletter
Let's learn to become better developers.
How to Manage Environment Variables in Rails
Now you might think it’s so easy to access them using the ENV hash. Why do we need a different way?
June 02, 2022
Useful Linux Commands
“Learning the Linux command line, like becoming an accomplished pianist, is not something that we pick up in an afternoon. It takes years of practice.
May 12, 2022
How to Convert a Ruby Object to Hash
Let’s say you have a Product object with properties @name = "Table" & @price = 10. What’s the best way in Rails to convert this object to the Hash { name: "Table", price: 10 }?
May 01, 2022
Useful Ruby Gems
Although Rails provides great defaults out-of-the-box, you can easily extend it with Ruby gems. Here are some gems that I find myself using every time I start a new Rails project.
April 25, 2022
How to Access Route Helpers from Rails Console and Models
This post shows a simple way to check the output of URL and path helpers directly from the Rails console. We will also see how to access these helpers in your models.
April 19, 2022
Why Turbo Uses Event Capturing
“💡 If you are interested in learning about Hotwire, check out my crash-course on Hotwire's Turbo framework.”
April 11, 2022
Why Choose `let` Over instance variables in RSpec
Repetitive setup code in tests makes it difficult to refactor the tests. It also distracts and shifts our focus from the business logic that we’re trying to test with the setup details. This post explains three ways to reduce the setup duplication in your tests.
March 25, 2022
Inline Edits using Turbo Frames
This post explains how to use Turbo Frames to make your web application behave like a Single-Page Application without using any JavaScript.
February 25, 2022
Turbo Drive Essentials
💡 If you are interested in learning about Hotwire, check out my crash-course on Hotwire's Turbo framework.
February 11, 2022
Launching Multiple Processes with a Single Command in Rails
An application doesn’t exist in isolation. Usually, it depends on other processes to work correctly, such as a database, JavaScript / CSS compilers, Redis, etc.
January 30, 2022