ruby-doc.org

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

github.com

The linked rbenv plugin rbenv-each is very helpful to keep QoL gems up to date that are not part...

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...

When you write your next CarrierWave uploader, consider processing your images with libvips instead of ImageMagick. Reasons for libvips

newrelic.com

alias_method makes a copy of a method. This works fine until the same method is overridden using prepend. If...

It most cases it's not necessary to add a version constraint next to your gems in the Gemfile. Since...

With this Ruby script you can print all values in a Redis database to your console (derived from this bash...

tl;dr asdf allows you to manage multiple runtime versions with a single CLI tool and is backwards compatible by...

In Ruby on Rails ActiveRecord::Relation#merge overwrites existing conditions on the same column. This may cause the relation to...

If you want to to create maps within SASS/SCSS-files, it normally works like this: $some-map: (key1: value1, key2: value2...

Haml 6 was a major rewrite with performance in mind. To achieve a performance improvement of 1.7x, some design...

Capybara has a variety of finder methods like find_button to help you look up DOM elements. There are also...

ruby-doc.org

We will achieve this by creating a block accepting method to optionally create and then lock a .lock File of...

github.com

Since Ruby 3.2.0 you can measure coverage support for eval statements and support has been added for the simplecov gem...

makandra dev

This is a checklist I use to work on issues. For this purpose I extracted several cards related to the...

HTTP header values must only contain low-ASCII (7-bit) characters for safe transport. From RFC 7230: Historically, HTTP has...

Sometimes I ran across a GitHub merge request of a gem where it was not completely obvious in which version...

geekytidbits.com

To retrieve only unique combinations of the selected attributes: You can omit rows, where all selected columns are equal with...

thepugautomatic.com

How a macro can dynamically define a method that can be overridden with super in the same class.

kukicola.io

Using ActiveRecord's #signed_id and .find_signed methods you can create URLs that expire after some time. No conditionals...

When an object is created / updated, various callbacks are executed in this order: before_validation after_validation before_save

bundler.io

Bundler so far ignored the version specified under BUNDLED_WITH in the Gemfile.lock. This had two annoying consequences:

makandra dev
ruby-doc.org

TLDR if you define a equality method for a class you must also implement def hash. Ruby has a lot...