I recently stumbled upon the Rails feature composed_of. One of our applications dealt with a lot of addresses and...
Recently I needed to benchmark an Active Record query for performance measurements. I wrote a small script that runs each...
It's possible to implement simple custom RuboCop cops with very little code. They work exactly the same like existing...
Sometimes we have to write code that behaves differently based on the version of a specific gem or the Ruby...
I recently stumbled over a quirk in the way Ruby handles local variables that I find somewhat dangerous. Consider:
I was recently asked to optimize the response time of a notoriously slow JSON API endpoint that was backed by...
While most Rails Apps are tied to at least one external REST API, machine-to-machine communication via GraphQL is...
When Rails releases a new version of their gems, they also release a number of npm packages like @rails/activestorage or...
This card shows an uncommon way to retrieve a file using selenium where JavaScript is used to return a binary...
Some rubygems come in platform-specific versions (i.e. "x86_64-linux") in addition to the usual "ruby" platform. This is...
Running gem update --system will install the latest version of RubyGems. However the latest version might not be compatible with...
You might know a few examples, where you configure some library via a block. One example is the Rails configuration...
This card is a short summary on different ways of assigning multiple attributes to an instance of a class.
What is makandra cards? We are makandra, a team of 60 web developers, DevOps and UI/UX experts from Augsburg, Germany...
When making requests using the http gem you might want to automatically follow redirects to get the desired response. This...
Debugging performance issues in your Rails app can be a tough challenge. To get more detailed insights consider using the...
If you need to make an HTTPS connection to a host which uses an expired certificate, do not disable certificate...
It's 2024 and we have tools like ffmpeg, imagemagick and GPT readily available. With them, it's easy to...
The author describes his little journey in hunting down a memory leak. Maybe his approach and tooling may one day...
Any form fields where users enter numbers should be an . Numeric inputs have several benefits over : On mobile or tablet...
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...
There are a few tools to combat the dreaded n+1 queries. The bullet gem notifies you of missing eager...
Ruby methods which load from a Yaml file, like YAML.safe_load or YAML.safe_load_file, support passing freeze: true to...
Here are some hints on best practices to maintain your tasks in larger projects. Rake Tasks vs. Scripts