Chrome DevTools: Treasure (Overview)
tl;dr The Chrome DevTools are a neat collection of tools for the daily work as a web developer. If...
Chrome DevTools: DOM Breakpoints - Breakpoints on HTML Elements
tl;dr In Chrome DevTools in the Elements tab or in Firefox in the Inspector tab you can right click...
Debug flaky tests with an Unpoly observeDelay
Unpoly's [up-observe], [up-autosubmit] and [up-validate] as well as their programmatic variants up.observe() and up.autosubmit...
Git commands to discard local changes
You have uncommited changes (you can always check by using git status), which you want to discard.
SEO: The subtle differences of robots.txt disallow vs meta robots no-index
The robots.txt file and HTML tag can be used to control the behavior of search engine crawlers. Both have different...
Rails: Custom validator for "only one of these" (XOR) presence validation
For Rails models where only one of multiple attributes may be filled out at the same time, there is no...
Rails: Fixing the memory leak / performance issues in prepend_view_path
Recently we detected a memory leak in one of our applications. Hunting it down, we found that the memory leak...
A short overview of common design patterns implemented within Rails
The linked content includes a few design patterns implemented with Ruby on Rails. What is the card indented to achieve...
JavaScript: Testing whether the browser is online or offline
You can use the code below to check whether the browser can make connections to the current site: await isOnline...
Josh McArthur: Fancy Postgres indexes with ActiveRecord
I recently wanted to add a model for address information but also wanted to add a unique index to those...
Debug file system access in a Rails application
It might sometimes be useful to check whether your Rails application accesses the file system unnecessarily, for example if your...
Capybara: Most okayest helper to download and inspect files
Testing file download links in an end-to-end test can be painful, especially with Selenium. The attached download_helpers.rb provides...
RSpec: How to turn off partial double verification temporarily
While verifying doubles in RSpec is a good default, it is limited in the amount of methods it actually is...
ActiveRecord: Query Attributes
tl;dr You can use attribute? as shorthanded version of attribute.present?, except for numeric attributes and associations. Technical Details
Version 5 of the Ruby Redis gem removes Redis.current
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...
Terminator setup for Procfile-based applications for more comfortable debugging
We use foreman to start all necessary processes for an application, which are declared in a Procfile. This is very...
esbuild: Make your Rails application show build errors
Building application assets with esbuild is the new way to do it, and it's great, especially in combination with...
Carrierwave: How to attach files in tests
Attaching files to a field that is handled by Carrierwave uploaders (or maybe any other attachment solution for Rails) in...
Capybara: Finding invisible elements and how to test that an element is not visible
When Capybara locates elements in the DOM, by default it allows only accessing visible elements -- when you are using a...
Caching in Rails < 6.1 may down parts of your application when using public cache control
Proxy caching is a good feature to serve your publicly visible application content faster and reduce load on your servers...
New gem: Rack::SteadyETag
Rack::SteadyETag is a Rack middleware that generates the same default ETag for responses that only differ in CSRF tokens...
The TCF 2.0 (Tranparency and Consent Framework) standard, and what you should know about it
The Interactive Advertising Bureau (IAB) is a European marketing association which has introduced a standard how advertising can be served...
Finding ancestors with Capybara
Modern versions of Capybara include a finder method #ancestor which allows you to find a parental element using CSS or...
Using feature flags to stabilize flaky E2E tests
A flaky test is a test that is often green, but sometimes red. It may only fail on some PCs...