Blog

Ruby

89 posts tagged ruby — the same founder-tested patterns, filtered.

Tips for writing readable system tests in Rails

Tips for writing readable system tests in Rails

The Four-Phase Test pattern applied to Rails system tests, and how keeping those phases visible keeps a Capybara spec readable months later.
How to handle remote services in tests

How to handle remote services in tests

Do you have difficulties in adding the new tests and their readability decreased due to mocks and stubs?
Where to read ENV variables in Ruby on Rails application

Where to read ENV variables in Ruby on Rails application

What if the project has too many dependencies from the environment variables?
JetThoughts is recognized by Techreviewer as a Top Web Development Company in 2020

JetThoughts is recognized by Techreviewer as a Top Web Development Company in 2020

Techreviewer named JetThoughts one of its leading web development companies for 2020.
How to avoid N+1 query using SQL views (materialized) in Rails application

How to avoid N+1 query using SQL views (materialized) in Rails application

In the first part, we considered the solution with extracting logic to the separate class and implementing the Facade pattern.
Placeholder Image

Enum validation in Ruby on Rails 7.1

The latest version of Rails 7.1 introduces the ability to validate enums, enhancing data integrity and error handling in Rails models.
5 Rails Virtual Attribute Use Cases - Skip the Column

5 Rails Virtual Attribute Use Cases - Skip the Column

Use Rails virtual attributes to handle data without adding a database column. Five practical patterns for formatting, confirmation fields, and more.
Placeholder Image

Setting Up Docker for Ruby on Rails 7

Setting up Docker for a Ruby on Rails 7 application from scratch, from installing Docker to a working container the whole team can share.
More control over enum in Rails 7.1

More control over enum in Rails 7.1

ActiveRecord::Enum in Rails have long been a convenient tool for representing a set of symbolic values within a model.
Anonymous block argument in Ruby

Anonymous block argument in Ruby

In the Ruby programming language, it is possible to use default block parameters instead of variables.

Reading this because something is going wrong?

A free code audit gives you a written assessment of your codebase in plain English.

Get a Free Code Audit

Rated 4.8/5 on Clutch · you keep the write-up either way