Tested on Ubunut 22.04 1. Opener script Create a file ~/.local/bin/coverage_zip_opener with: #!/bin/bash tmp_folder="/tmp/coverage-report-opener" if [ -z "$1" ]
Today I learned that you can animate HTML elements using the Web Animation API's method .animate(keyframes, options) (which...
Here are some hints on best practices to maintain your tasks in larger projects. Rake Tasks vs. Scripts
Version 3.7.0 broke some things in complex forms. Sorry for that. Concurrent user input is hard. 3.7.1 This change fixes...
You can use the config.x configuration in combination with config_for to configure global settings for your Rails 4.2+ application...
A list of clever debugging tricks. TOC: Advanced Conditional Breakpoints monitor() class Calls Call and Debug a Function Pause Execution...
The linked article suggests an interesting way to speed up tests of Rails + Postgres apps: PostgreSQL allows the creation of...
Getting an entire test suite green can be a tedious task which involves frequent switches between the CLI that is...
In the Gitlab settings the flag Auto-cancel redundant pipelines is enabled by default. This auto-cancels pipelines with jobs...
A general overview about why and how we migrate can be found under Migrating from Elasticsearch to Opensearch
In Capistrano 3, your Capfile requires 'capistrano/rails/migrations', which brings two Capistrano tasks: deploy:migrate and deploy:migrating. The former checks...
#pluck is commonly used as a performant way to retain single database values from an ActiveRecord::Relation Book.pluck(:title, :price...
Added: State machine can now use the :prefix-option to avoid name collision if you define multiple state machines on...
Getting CSS (and JS) live reloading to work in a esbuild / Rails project is a bit of a hassle, but...
Make sure that you use the correct property when editing an HTML attribute. Using innerHTML with unsafe arguments makes your...
The sprintf method has a reference by name format option: sprintf("% d : % f", { :foo => 1, :bar => 2 }) # => 1 : 2.000000
Ruby has the class Rational which allows you to store exact fractions. Any calculation on these variables will now use...
Even when you app has no CSS at all, you still inherit a default user agent stylesheet from your browser...
Every modern Rails app should have a Content Security Policy enabled. Very compatible default The following "default" is a minimal...
While upgrading CarrierWave from version 0.11.x to 3.x, we encountered some very nasty fails. Below are the basic...
All direct child directories of app are automatically added to the eager- and autoload paths. They do NOT create a...
TLDR Using .includes or .eager_load with 1-n associations is dangerous. Always use .preload instead. Consider the following ActiveRecord...
Most of our applications use CarrierWave for file uploads. CarrierWave has an integrated processing mechanism for different file versions with...
I recently stumbled over a problem that my feature tests broke in CI because of a mismatching chromedriver version.