The :nth-child pseudo class is commonly used for targeting elements based on their position within a parent container, for...
Interactively rebase your current branch onto main, keeping the original base commit (i.e. not rebasing onto main directly).
When you send automated emails from a noreply@-address, and the recipient has an out of office enabled, the autoreply...
Orca is a Linux screen reader. Since it is part of the GNOME project it should come preinstalled with Ubuntu...
For Selenium tests, your browser starts in your local timezone, or whatever your system's environment specifies. This is usually...
Why Rails has multiple schema formats When you run migrations, Rails will write your current database schema into db/schema.rb. This...
Here is a workaround for when you want to use text-wrap: balance but must also render nicely for browsers...
DirectUpload allows you to upload files to your file storage without having to wait for the form to submit. It...
ActiveStorage does not provide any built-in way of implementing authentication for the available DirectUpload endpoint in Rails. When using...
Added methods to keep the line number steady while you time-travel between commits: Copy the file to a new...
I have moved away from creating fixture elements using CSS selectors. While CSS can be very concise, it can be...
SVG files often contain redundant information, like editor metadata or hidden elements. When esbuild handles your static assets, you can...
PostgreSQL can cosplay as a full-text search engine. It doesn't have the features or fidelity of ElasticSearch or...
There are several ways to run a single spec. I usually copy the spec file path with the line number...
The key to unlocking the full potential of LLMs in coding lies in crafting precise prompts. The main challenge is...
In Slack, the settings dialog only offers a fixed selection of fonts. You can use any font you like using...
Rails wraps your parameters into an interface called StrongParameters. In most cases, your form submits your data in a nested...
The new params.expect method in Rails 8 improves parameter filtering, addressing issues with malformed input and enhancing security. It provides...
Bundler allows you to specify the name of the Gemfile you want to bundle with the BUNDLE_GEMFILE environment variable...
To reverse lookup a fixture by its table name and id, use the following approach on ActiveRecord::FixtureSet: table = 'users...
TL;DR: Rails ships two methods to convert strings to constants, constantize and safe_constantize. Neither is safe for untrusted...
In development, we store files using ActiveStorage's disk service. This means that stored files are served by your Rails...
tl;dr When a cookie includes an Expires attribute or an HTTP response includes caching headers like Expires or Cache...
In FactoryBot factories, Rails' file_fixture is not available by default. To enable it, include a support module from rspec...