To allow HTTP 304 responses, Rails offers the fresh_when method for controllers. The most common way is to pass...
Greg Molnar has written a neat article about creating a single-file Rails app. This is not meant for production...
If your postgres database is only accessible from inside a kubernetes cluster, e.g. if it's configured in AWS RDS...
Here's a one-liner to view base64 encoded secrets in kubernetes. Make sure you have jq installed.
When working with feature branches, stale branches pile up over time. It's best to remove them right after merge...
When your Rails application offers downloading a bunch of files as ZIP archive, you basically have two options:
The linked content includes a few design patterns implemented with Ruby on Rails. What is the card indented to achieve...
These are the results of the "personal tech stack survey". I've included only the most popular mentions, maybe it...
SELECT pg_size_pretty(pg_database_size('some-database')); Example SELECT pg_size_pretty(pg_database_size('cards_p')); ----------------
While working on a Rails application, your code base will grow a collection of different file types including: Ruby (business...
Beim schreiben von Scripts ist es nützlich Tests zu schreiben um bei Änderungen nicht alles nochmals manuell testen zu müssen...
Bei Automatisierungsaufgaben kannst du dich nicht immer auf fertige Tools verlassen. Häufig musst du eine Schnittstelle zu einem bestehenden System...
Based on the Ruby Basics Card in the developer Curriculum Ruby is the programming language we use on the backend...
Instead of using Puppet exported resources you can use the puppetdb_query feature. This can result in more complex code...
How can I configure virtual IP's? There are two parameter to set up virtual ips in Keepalived: virtual_ipaddress...
tl;dr Since Rails 6.1+ you can use .compact_blank or .compact_blank! to remove blank values from collections (e.g...
When paginating records, we usually need to know the number of total records in order to render pagination links. Popular...
You can use the code below to check whether the browser can make connections to the current site: await isOnline...
When changing code in mailers, updating the corresponding mailer preview can be forgotten very easily. Mailer previews can be tested...
When redirecting you should take care to use the right HTTP status code. From controllers When redirecting from a controller...
It might sometimes be useful to check whether your Rails application accesses the file system unnecessarily, for example if your...
I recently had the problem that embedded code boxes crashed my layout. It turned out that pres break out of...
Code quality can be measured in four levels: (Working code) Reliable code (minimum) Readable code (ok for short-lived code...
There is a way to use multiple databases in Rails. You may have asked yourself how you're able to...