Rails wraps your parameters into an interface called StrongParameters. In most cases, your form submits your data in a nested...
TL;DR: Rails ships two methods to convert strings to constants, constantize and safe_constantize. Neither is safe for untrusted...
In development, we store files using ActiveStorage's disk service. This means that stored files are served by your Rails...
If you update Selenium regularly, you'll run into deprecation warnings similar to: WARN Selenium [:clear_local_storage] [DEPRECATION] clear...
The ActiveSupport::BroadcastLogger allows you to log to multiple sinks. You know this behavior from from the rails server command...
Rails' default logger prefixes each log entry with timestamp and tags (like request ID). For multi-line entries, only the...
Terser is a really good minifier ("compressor") for JavaScript code. I'm often surprised by the thoughtfulness of its compressed...
I was recently asked to optimize the response time of a notoriously slow JSON API endpoint that was backed by...
As we're switching from PT to Linear, I've updated the existing bash script to work for commits that...
Raising errors for required and permitted attributes makes it easier to find errors in your application during development and in...
There are two ways a logout in SAML can happen: Service Provider (SP) initiated and Identity Provider (IDP) initiated logout...
Starting with Rails 7.1 the production logger is set to standard out. For applications running with opscomplete ensure to keep...
Sometimes you have a file that is related to a project, while not actually being part of it. You'd...
A Rails script lives in lib/scripts and is run with bin/rails runner lib/scripts/.... They are a simple tool to perform...
87.140.79.42 - - [23/Jan/2024:09:00:46 +0100] "GET /monitoring/pings/ HTTP/1.1" 200 814 "-" "Ruby" 87.140.79.42 - - [23/Jan/2024:09:00:46 +0100] "GET...
I, [2024-01-21T06:22:17.484221 #2698200] INFO -- : [4cdad7a4-8617-4bc9-84e9-c40364eea2e4] test
The linked article suggests an interesting way to speed up tests of Rails + Postgres apps: PostgreSQL allows the creation of...
This Capistrano task runs a command on all servers. bundle exec cap production app:run cmd='zgrep -P "..." RAILS_ROOT/log/production.log...
Getting CSS (and JS) live reloading to work in a esbuild / Rails project is a bit of a hassle, but...
Most of our applications use CarrierWave for file uploads. CarrierWave has an integrated processing mechanism for different file versions with...
By default, Devise sends all emails synchronously with deliver_now. To change that, Devise's readme suggests overwriting the send...
You don't want sensitive user data in your logs. Background Rails per default filters sensitive data like...
Disclaimer This card is a collection of guides and things to have in mind when upgrading to a specific version...
Both knapsack and parallel_tests have the option to split groups by historic execution time. The required logs for this...