So you have a heading that is just barely wider than the container it should fit into, and it wraps...

makandra dev

We have a long-standing checklist for merge requests. However, it hardly matches the intricate requirements for design. This checklist...

It most cases it's not necessary to add a version constraint next to your gems in the Gemfile. Since...

makandra dev

As we are slowly switching from Cucumber scenarios to RSpec feature specs, you might be tempted to write assertions like...

Looking at the source code of the validates_numericality_of validator, it becomes clear that it converts the attribute in...

When you allow file uploads in your app, a user might upload content that hurts other users. Our primary concern...

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

In Ruby on Rails ActiveRecord::Relation#merge overwrites existing conditions on the same column. This may cause the relation to...

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

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

By activating strict_loading you force developers to address n+1 queries by preloading all associations used in the index...

journalctl _CMDLINE=dockerd podman journalctl SYSLOG_IDENTIFIER=podman identifying potential filter fields journalctl -o verbose journalctl -o json | jq

makandra dev

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

HTTP header values must only contain low-ASCII (7-bit) characters for safe transport. From RFC 7230: Historically, HTTP has...

Carrierwave's BaseUploader can have some validations that you can use by overriding a certain method, which's expected name...

vertical-align is hard. Have you ever wanted to vertically center an icon with text? This usually means "vertically align...

thepugautomatic.com

How a macro can dynamically define a method that can be overridden with super in the same class.

makandra dev
ruby-doc.org

TLDR if you define a equality method for a class you must also implement def hash. Ruby has a lot...

makandra dev

Timecop is a great gem to set the current time in tests. However, it is easy to introduce flakyness to...

makandra dev

In a Jasmine spec you want to spy on a function that is imported by the code under test. This...

We usually rely on VCR and WebMock to prevent any real network connection when running our unit tests.

By default subscript ( ) and superscript ( ) tags are styled with vertical-align: sub, respectively vertical-align: super by most browsers.

You have some SVG files you want to use as icons on your website. How would you embed them?

In esbuild, you usually import other files using relative paths: import './some-related-module' import `../../utils/some-utility-module` import `../../../css/some-css.sass` This is totally fine...