While upgrading CarrierWave from version 0.11.x to 3.x, we encountered some very nasty fails. Below are the basic...
TLDR Using .includes or .eager_load with 1-n associations is dangerous. Always use .preload instead. Consider the following ActiveRecord...
Given you have an array column like this: create_table "users", force: :cascade do |t| t.integer "movie_ids", default: [], array...
View specs are a powerful tool to test several rendering paths by their cases instead of using a more costing...
We regularly have tasks that need to be performed around a deploy. Be it to notify operations about changed application...
Do you remember finding where a method is defined? I recently that Method objects are quite useful within a debugging...
You don't want sensitive user data in your logs. Background Rails per default filters sensitive data like...
Besides Plotting graphs in Ruby with Gruff, which comes handy for many uses cases, you sometimes might need configuration for...
For my computer science bachelor's thesis I programmed and evaluated a CLI Test Case Prioritization (TCP) tool for makandra...
There are multiple ways to redirect URLs to a different URL in Rails, and they differ in small but important...
Rails' url_for is useful for generating routes from a Hash, but can lead to an open redirect vulnerability.
Rails' Strong Parameters enable you to allow only specific values from request params to e.g. avoid mass assignment.
In CI test runs I noticed that string sorting order changed after switching from a debian-based PostgreSQL docker image...
TL;DR: Grid elements have min-width: auto in a 1fr column, which may lead to overflows. With minmax(0...
Sometimes you'll find yourself with a set of tasks that require similar code for different models. For example, if...
Using querySelector or querySelectorAll in JavaScript, you can easily find descendants of a node that match a given selector.
It most cases it's not necessary to add a version constraint next to your gems in the Gemfile. Since...
Code splitting is a feature of esbuild that can keep huge libraries out of the main bundle. How code splitting...
Within Vim do the following: Move cursor to the first starting line where you want to start editing
With this Ruby script you can print all values in a Redis database to your console (derived from this bash...
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...
You have an async function that rejects: async function failingFunction() { throw new Error("Something went wrong") } When you call that...
When trying to intersect conditions of two scopes, be careful with ActiveRecord::Relation#merge: it overwrites existing conditions on the...