Case studies and experiments demonstrating the impact of web performance optimization (WPO) on user experience and business metrics.
To allow HTTP 304 responses, Rails offers the fresh_when method for controllers. The most common way is to pass...
For Rails models where only one of multiple attributes may be filled out at the same time, there is no...
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...
Recently we detected a memory leak in one of our applications. Hunting it down, we found that the memory leak...
The linked content includes a few design patterns implemented with Ruby on Rails. What is the card indented to achieve...
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...
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...
When paginating records, we usually need to know the number of total records in order to render pagination links. Popular...
I recently wanted to add a model for address information but also wanted to add a unique index to those...
Imagine these models and associations: class Deck < ApplicationRecord has_many :cards end class Card < ApplicationRecord belongs_to :deck, optional: true...
It might sometimes be useful to check whether your Rails application accesses the file system unnecessarily, for example if your...
Testing file download links in an end-to-end test can be painful, especially with Selenium. The attached download_helpers.rb provides...
There is a way to use multiple databases in Rails. You may have asked yourself how you're able to...
tl;dr You can use attribute? as shorthanded version of attribute.present?, except for numeric attributes and associations. Technical Details
You can use Unpoly's up.on with a named listener function and immediately unbind this event listener with { once: true...
If you're using many terraform root modules in a repository, downloading common providers like the AWS one can quickly...
tl;dr: Use the URLSearchParams API to make your live easier if you want to get or manipulate query parameters...
Redis.current will be removed without replacement in redis-rb 5.0. Version 4.6.0 adds deprecation warnings for Redis.current and Redis.current=: `Redis.current...