ActiveStorage does not provide any built-in way of implementing authentication for the available DirectUpload endpoint in Rails. When using...

When Ruby objects are inspected in any modern IRB, some objects (like ActiveRecord instances) are rendered with neat colors and...

stevenhicks.me

Sometimes you want to write a test for a business rule that's based on multiple variables. In your goal...

makandra dev
github.com

I was recently asked to optimize the response time of a notoriously slow JSON API endpoint that was backed by...

This card describes two variants, that add a more intuitive workflow when working with nested attributes in Rails + Unpoly.

Debugging performance issues in your Rails app can be a tough challenge. To get more detailed insights consider using the...

github.com

There are a few tools to combat the dreaded n+1 queries. The bullet gem notifies you of missing eager...

Tested on Ubunut 22.04 1. Opener script Create a file ~/.local/bin/coverage_zip_opener with: #!/bin/bash tmp_folder="/tmp/coverage-report-opener" if [ -z "$1" ]

Your development server is usually running on an insecure HTTP connection which is perfectly fine for development.

This Capistrano task runs a command on all servers. bundle exec cap production app:run cmd='zgrep -P "..." RAILS_ROOT/log/production.log...

TLDR Using .includes or .eager_load with 1-n associations is dangerous. Always use .preload instead. Consider the following ActiveRecord...

The recommended additional setup of the spreewald gem, a useful set of cucumber steps, includes adding a file for defining...

ruby-doc.org

Do you remember finding where a method is defined? I recently learned from a senior colleague that Method objects are...

Besides Plotting graphs in Ruby with Gruff, which comes handy for many uses cases, you sometimes might need configuration for...

github.com

For my computer science bachelor's thesis I programmed and evaluated a CLI Test Case Prioritization (TCP) tool for makandra...

atlassian.com

Git log offers useful options for filtering. This card provides a short overview. By message Only commits that include a...

Sometimes you'll find yourself with a set of tasks that require similar code for different models. For example, if...

Splitting up commits makes the process of reviewing often easier, since you can create several merge requests or review every...

makandra dev
gist.github.com

Context and further resources Even though you can get 90% of debugging done with up to 5 basic byebug commands...

By activating strict_loading you force developers to address n+1 queries by preloading all associations used in the index...

As a developer you may have many tools watching your project for changes: Your IDE, Webpack, Guard, etc. This is...

makandra dev

tl;dr git checkout is the swiss army of git commands. If you prefer a semantically more meaningful command for...

In Chrome DevTools you can use getEventListeners(object) to get a list of registered event listeners on the specified object...

makandra dev

To ensure a consistent code style for JavaScript code, we use ESLint. The workflow is similar to integrating rubocop...