github.com

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

If you use a newer SSH key generated with the ED25519 algorithm instead of RSA (see Create a new SSH...

makandra dev

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

In the past we validate and set default values for boolean attributes in Rails and not the database itself.

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.

After upgrading to Rails 6.1.7.2 one of our apps printed a wall of warnings while booting: /var/www/app/shared/bundle/ruby/2.6.0/gems/net-protocol-0.2.1/lib/net/protocol.rb:68: warning: already...

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

makandra dev

Timecop is a great gem to set the current time in tests. However, it is easy to introduce flakyness to...

We usually rely on VCR and WebMock to prevent any real network connection when running our unit tests.

makandra dev

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

tl;dr In RubyMine you can use find and replace with capture groups (.*?) and backreferences $1 (if you have several...

Ruby's standard library includes a class for creating temporary directories. Similar to Tempfile it creates a unique directory name...

A memory leak is an unintentional, uncontrolled, and unending increase in memory usage. No matter how small, eventually, a leak...

If you need to convert an SVG source to PS or EPS, the most common suggestion on the interwebs is...

greg.molnar.io

Greg Molnar has written a neat article about creating a single-file Rails app. This is not meant for production...

When your Rails application offers downloading a bunch of files as ZIP archive, you basically have two options:

paweldabrowski.com

The linked content includes a few design patterns implemented with Ruby on Rails. What is the card indented to achieve...

These are the results of the "personal tech stack survey". I've included only the most popular mentions, maybe it...