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...
Frontend performance and user experience are orthogonal to feature development. If care is not taken, adding features usually degrades frontend...
If you want to build a small CLI application, that supports more advanced inputs than gets, I recommend using the...
The DB schema is the most important source of truth for your application and should be very self-explanatory. If...
Even if you don't make any beginner mistakes like N+1 queries or missing DB indices, some requests can...
If you need dummy data to play around with in development, it's often faster to reuse your existing factories...
Use these snippets when you want to measure yourself. Currently available: Core Web Vitals Largest Contentful Paint (LCP) Largest Contentful...
Say you wrap your index view in a form to apply different filters like pagination or a search query. On...
When you want to filter records in a model where a string column roughly matches a given term, you can...
You can check the maximum client Redis database size in Sidekiq with this command. Sidekiq.redis { |redis| puts redis.info.fetch('maxmemory_human...
In Rails, the implicit_order_column (added in Rails 6) is a configuration option that helps you define the default...
Why Rails has multiple schema formats When you run migrations, Rails will write your current database schema into db/schema.rb. This...