Every Rails response has a default ETag header. In theory this would enable caching for multiple requests to the same...

Haml 6 was a major rewrite with performance in mind. To achieve a performance improvement of 1.7x, some design...

Usually you add errors to :base in ActiveRecord, in case no appropriate attribute could be used to add the error...

Maintaining larger projects makes it more difficult to balance refactoring and upgrade tasks according to its actual value. Consider to...

Let's say we have posts with an attribute title that is mandatory. Our example feature request is to tag...

Rails offers the fresh_when method to automatically compute an ETag from the given record, array of records or scope...

github.com

Since Ruby 3.2.0 you can measure coverage support for eval statements and support has been added for the simplecov gem...

makandra dev

This is a checklist I use to work on issues. For this purpose I extracted several cards related to the...

makandra dev

Rails partials have a lot of "hidden" features and this card describes some non-obvious usages of Rails Partials.

Not all email clients support external images in all situations, e.g. an image within a link. In some cases, a...

Jasmine specs for the frontend often need some DOM elements to work with. Because creating them is such a common...

tl;dr The Chrome DevTools are a neat collection of tools for the daily work as a web developer. If...

tl;dr In Chrome DevTools in the Elements tab or in Firefox in the Inspector tab you can right click...

You have uncommited changes (you can always check by using git status), which you want to discard.

workingdraft.de

The robots.txt file and HTML tag can be used to control the behavior of search engine crawlers. Both have different...

Recently we detected a memory leak in one of our applications. Hunting it down, we found that the memory leak...

makandra dev

To ensure a consistent code style for JavaScript code, we use ESLint. The workflow is similar to integrating rubocop...

Building application assets with esbuild is the new way to do it, and it's great, especially in combination with...

github.com

When Capybara locates elements in the DOM, by default it allows only accessing visible elements -- when you are using a...

css-tricks.com

An element with display: grid can define its grid-template-columns based on (preferred) child width using the repeat function...

TL;DR When using Cache-Control on a Rails application, make sure the Vary: Accept header is set.

makandra dev
github.com

Rack::SteadyETag is a Rack middleware that generates the same default ETag for responses that only differ in CSRF tokens...

A flaky test is a test that is often green, but sometimes red. It may only fail on some PCs...

makandra dev

Besides their default styling properties, HTML elements have a semantic meaning. For example, an h1 tag is usually styled with...