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

Usually you add errors to :base in ActiveRecord, in case no appropriate attribute could be used to add the error...

Maintaining larger projects makes it more difficult to balance refactoring and upgrade tasks according to its actual value. Consider to...

Let's say we have posts with an attribute title that is mandatory. Our example feature request is to tag...

By default most exceptions in Rails will render a 500 error page and will create a new issue in your...

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

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

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.

Carrierwave's BaseUploader can have some validations that you can use by overriding a certain method, which's expected name...

Since Rails 7 you are able to encrypt database information with Active Record. Using Active Record Encryption will store an...

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

When you use the :as option to map a power to a controller method you can now override the generated...

thepugautomatic.com

The linked article shows how metapogramming macros can use define_method to make a method that can be overridden with...

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

phili.pe

The linked article found a simple way to rewrite legacy git aliases to make them work with differently named default...

Let's assume that we have a model Movie that registers a callback function when a new instance of Movie...

I recently enjoyed debugging a Cucumber step that tried to be retryable using a patiently block: Then /^"([^"]*)" should( not)? be...

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:

Our CI setup frequently sees this error while running yarn install: yarn install v1.22.19 [1/4] Resolving packages... [2/4] Fetching packages...

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

In a Jasmine spec you want to spy on a function that is imported by the code under test. This...