When testing JavaScript functionality in Selenium (E2E), you may need to access a class or function inside of a evaluate...

We have observed Lenovo laptops with nvidia graphics losing performance after they have been in use for a few minutes...

rspec.info

rspec >= 3.1 brings a method and_wrap_original. It seems a bit complicated at first, but there are use cases...

The usual way to build a relation in a ActiveSupport::Concern is this: module MyModule extend ActiveSupport::Concern

When storing files for lots of records in the server's file system, Carrierwave's default store_dir approach may...

When deleting a record in your Rails app, Carrierwave automatically takes care of removing all associated files. However, the file...

To attach files to your records, you will need a new database column representing the filename of the file...

When your Rails application server raises error, Capybara will fail your test when it clears the session after the last...

makandra dev

5.4.0 2021-02-01 Compatible changes Add geordi branch command that checks out a feature branch based on a story...

Consider the following models and form models: class Parent < ApplicationRecord has_many :children, class_name: 'Child', foreign_key: 'parent_id...

johnnunemaker.com

PostgreSQL has partial indexes. With a partial index you tell Postgres to only index rows matching a given query.

The Truemail gem (not to be confused with truemail.io) allows validating email addresses, e.g. when users enter them into a...

Using Ruby 1.8.7 you will not be able to use the maximum versions Rubygems 1.8.30 and Bundler 1.17.3 with https://...

github.com

Minidusen lets you find text in associated records. Assume the following model where a Contact record may be associated with...

Sometimes you want to find the inverse of an ActiveRecord scope. Depending on what you want to achieve, this is...

Ubuntu 18.04 uses systemd to manage services. There are basically two commands for listing all services and manipulating the state...

We currently test most of our gems on Travis CI, but want to migrate those tests to Github Actions. This...

makandra dev

While debugging a SPF record I found spf-record.de to be very helpful. it lists all IPs that are covered by...

ActiveRecord provides the ids method to pluck ids from a scope, but what if you need to pluck Global IDs...

When you use Sentry to monitor exceptions, an important feature is Sentry's error grouping mechanism. It will aggregate similar...

If you have a very large datadir in MariaDB and you want to transfer the data to another host (e.g...

"Open-source software (OSS) is great. Anyone can use virtually any open-source code in their projects." Well, it depends...

If you have a :string or :text field, you should pair it with a model validation that restricts its length...

makandra dev
github.com

FactoryBot allows to create traits from Enums since version 6.0.0 The automatic definition of traits for Active Record enum attributes...