...the file system. Since load order can be important, this may lead to different behavior on different machines which are hard to debug. Simply add a .sort: Dir.glob(Rails.root.join('lib/ext...

In the discussion of the difference between include and extend in Ruby, there is a misconception that extend would add...

postgresql.org

PostgreSQL offers a really handy field type: json. You can store any JSON there, in any structure. While its flexibility...

...often show or hide elements based on viewport dimensions, or may have components that behave differently (like mobile vs desktop navigation menus). Since you want your integration tests to behave...

...metrics". This allows you to configure dimensions larger than your display and enable/disable touch behavior. Simply use register_driver to set up a driver that you then connect to Capybara...

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

docs.zizmor.sh

The linked tool can be used to scan your CI/CD workflows for potential security issues and suboptimal defaults if they...

bibwild.wordpress.com

While debugging an intricate issue with failed HTTP requests I have come to appreciate the more advanced features of the...

In general, you should not put a block element inside an inline element. So don't do this: text

Authentication is hard: there are many edge cases, and most users (including yourself) usually only go the "happy path" once...

It's possible to implement simple custom RuboCop cops with very little code. They work exactly the same like existing...

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

When using Rails credentials, you will edit the encrypted credentials for staging or production environments from time to time. To...

I recently built a screen with a very high and wide table in the center. This posed some challenges:

This card describes different flavors for concatting HTML safe strings in a helper method in Rails. You might want to...

Most of our applications use CarrierWave for file uploads. CarrierWave has an integrated processing mechanism for different file versions with...

developer.mozilla.org

Text fragments allow linking directly to a specific portion of text in a web document, without requiring the author to...

Creating records in specs can be so fast that two records created instantly after one another might have the same...

When building an application that sends e-mails to users, you want to avoid those e-mails from being classified...

bundle outdated [--filter-major|--filter-minor|--filter-patch] Example output for bundle outdated --filter-major Other examples

Maintain this feature branch on a regular basis to not get too far behind production. Setup a reminder to either merge the branch or drop it. Inform the colleagues...

Sometimes it is useful to define a named scope by implementing a static method with the scope's name on...

Sometimes we have to write code that behaves differently based on the version of a specific gem or the Ruby Version itself. The version comparison can often be seen with...

...send a merge request, please confirm that your code ... has been reviewed by yourself beforehand fulfills every requirement defined as an acceptance criterion does not have any log or debugging...

Most of the time it is a tedious task to apply a code style guide to an existing code...