The sprintf method has a reference by name format option: sprintf("% d : % f", { :foo => 1, :bar => 2 }) # => 1 : 2.000000
Apply Test Driven Development(TDD) to the process of building container images by defining test before writing code and automate...
Every modern Rails app should have a Content Security Policy enabled. Very compatible default The following "default" is a minimal...
If you want to automatically delete old container images from your Elastic Container Registry, the solution is a quite simple...
While upgrading CarrierWave from version 0.11.x to 3.x, we encountered some very nasty fails. Below are the basic...
TLDR Using .includes or .eager_load with 1-n associations is dangerous. Always use .preload instead. Consider the following ActiveRecord...
Do you remember finding where a method is defined? I recently learned from a senior colleague that Method objects are...
Newest versions of Chromedriver breaks the user agent for device emulation via device name. In previous versions the user agent...
Rails offers several methods to manage three types of different cookies along with a session storage for cookies. These...
Git log offers useful options for filtering. This card provides a short overview. By message Only commits that include a...
When you write your next CarrierWave uploader, consider processing your images with libvips instead of ImageMagick. Reasons for libvips
Using querySelector or querySelectorAll in JavaScript, you can easily find descendants of a node that match a given selector.
We have a long-standing checklist for merge requests. However, it hardly matches the intricate requirements for design. This checklist...
Splitting up commits makes the process of reviewing often easier, since you can create several merge requests or review every...
Context and further resources Even though you can get 90% of debugging done with up to 5 basic byebug commands...
Debugging your integration tests, that run a headless Chrome inside a docker image, is tricky. In many cases you can...
Every Rails response has a default ETag header. In theory this would enable caching for multiple requests to the same...
In Ruby on Rails ActiveRecord::Relation#merge overwrites existing conditions on the same column. This may cause the relation to...
To navigate between test and test subject Rubymine requires you to set the test root sources as Test Sources Root...
Let's say we have posts with an attribute title that is mandatory. Our example feature request is to tag...
Rails Active Support provides some helpful methods for calculating times and dates, like Duration#ago or Duration#from...
Rails offers the fresh_when method to automatically compute an ETag from the given record, array of records or scope...
Testing your responses in Rails allows to parse the body depending on the response MIME type with parsed_body.
This is a checklist I use to work on issues. For this purpose I extracted several cards related to the...