Leaving old unused DB columns around after a migration is confusing for other developers. However, dropping columns too eagerly might...
I use the Gemini web chat interface quite extensively. One thing that is tedious is giving it all the context...
Event listeners are called in the order of their registration: button.addEventListener('click', () => console.log("I run first")) button.addEventListener('click', () => console.log("I...
I have a form with a dynamic number of fields. Submitting it worked fine until I tried out a very...
The :test adapter doesn't respect limits_concurrency configuration. Switch to :solid_queue adapter in your test to verify blocking...
Sometimes you have a maintenance script where you want to iterate over all ActiveRecord models. Rails provides this out of...
When creating a database table for a join model without further importance, you can use Rails' create_join_table:
It's not possible to use variables in media queries with plain CSS. @media (max-width: var(--some-pixel-size...
When you query the browser for DOM elements, there are some footguns you should know about. Some lists are synchronized...
You want to prevent input to a form field, but all the solutions have side effects: The [readonly] attribute is...
Most of the time, it's a good default to add a unique index on the foreign key when using...
Enable local logging for Sentry when: Debugging Sentry event capture locally Testing error handling without polluting production metrics Developing background...
Full-text search can reach its limits in terms of flexibility and performance. In such cases, trigram indexes (pg_trgm...
Quick guide for frequently used compiler selector patterns of Unpoly. 1. BEM Component Pattern When: Reusable UI components with multiple...
Performing COUNT(*) on large tables is slow. Sometimes you don’t need the exact number once results exceed a certain...
In Rails 8 the behavior of the rails db:migrate command has changed for fresh databases (see PR #52830).
I had to modify the time for an application that I launch through Docker. Here is an approach that worked...
There's a method Integer() defined on Kernel, that typecasts everything into an Integer. Integer("2") # 2 Integer("foo") # Invalid...
If you run a Rails app that is using Turbo, you might observe that your integration tests are unstable depending...
Most of the time, when you are interested in any log output, you see the logs directly on your console...
ActiveRecord computes table names of model classes, and results are usually just like you'd expect. Adding a prefix for...
Currently we often use geordi to run cucumber and rspec tests. Geordi takes care of installing a matching chromedriver for...
In Rails 7.2. the feature ActiveRecord.after_all_transactions_commit was added, for code that may run either inside or outside...
In Rails 7.2 the new default for config.action_dispatch.show_exceptions is rescuable. :rescuable: It will show a Rails error page in...