When your Rails application is using Redis as its cache store, this is how you can list existing keys:
When you replace parts of the DOM with new HTML, using .innerHTML = newHtml is usually the simplest and fastest option...
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 reference for passing data from Rails to JavaScript via Unpoly compilers. Haml Attribute Syntax # Ising hash rockets and string...
In Rails 8 the behavior of the rails db:migrate command has changed for fresh databases (see PR #52830).
This release adds asynchronous compilers and many other features requested by the community. We also fixed a number of performance...
GoodJob and ActiveJob rescue exceptions internally, preventing exception_notification from triggering. This can cause silent job failures.To get notified, subscribe...
prettier calls itself an opinionated code formatter. I recommend using it for your JavaScript and TypeScript code. prettier only concerns...
Rails log files rotate automatically when they reach approx. 100MB: $ ls -lh log/ -rw-r--r-- 1 user group 55M...
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...
Coverage reports are rarely useful if you run only small parts of your test suite. Just do not load SimpleCov...
When RSpecs runs the first feature spec, you may see log output like this: Capybara starting Puma... * Version 6.5.0, codename...
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...
You can report CSP violations to Sentry. Within config/initializers/content_security_policy.rb: Rails.application.configure do config.content_security_policy do |policy| # Settings for the policy...
We usually ship applications that self-host webfonts to comply with GDPR. Many popular web fonts are available as NPM...
The linked article shows how to configure omniauth-multi-provider to support multiple SAML identity providers for a single Rails...
If you need dummy data to play around with in development, it's often faster to reuse your existing factories...
When you want to filter records in a model where a string column roughly matches a given term, you can...