We have deprecated Rack::SteadyETag
Rack::SteadyETag generated stable ETags for responses that only changed in CSRF tokens or CSP nonces. Rails apps should be configured to return identical HTML for the same resource and user.
Rails: Fixing ETags that never match
Rails default ETags often never repeat because rotating CSRF tokens and CSP nonces change response bytes, blocking cache hits and 304 responses.
Operators "in" and "of" are very inconsistent between CoffeeScript and JavaScript
in and of mean different things in CoffeeScript and JavaScript, making property checks and iteration easy to mix up.
Popular mistakes when using nested forms
Common Rails nested form pitfalls include missing accepts_nested_attributes_for, wrong form helper scope, and lost parameters that prevent child records from saving.
Test-Driven Development with integration and unit tests: a pragmatic approach
Dogmatic red-green-refactor TDD can be tedious; a pragmatic mix of integration and unit tests uses scenario titles as a todo list and supports iterative development.
Modern CSS supports individual transform properties
Individual transform properties make CSS transforms easier to read, animate, and maintain, with broad browser support for scale, rotate, and translate.
ASDF: A Version Manager To Rule Them All
asdf manages multiple runtime versions through one CLI and supports legacy version files like .nvmrc and .ruby-version for smoother migration from rbenv.
Jasmine: Preventing unhandled promise rejections from failing your test
Async rejections can fail Jasmine tests as unhandled promise rejections when the promise is not awaited or returned. jasmine.spyOnGlobalErrorsAsync() lets tests ignore or inspect the global error.
Decide whether cronjobs should run on one or all servers
Cron jobs sometimes need to run on exactly one server or on every server; whenever_roles can separate shared tasks from single-host tasks.
Take care of indentation and blank lines when using .erb for plain text emails
Plain text .erb emails preserve indentation and blank lines, so indented template code can insert unwanted spaces or extra newlines. Trim mode and unindented markup prevent formatting bugs.
RSpec: Run a single spec (Example or ExampleGroup)
Limit a test run to one example or group with :focus, fit, fdescribe, or fcontext; unfocused suites fall back to running everything.
CSP: strict-dynamic
CSP nonce-based policies can replace brittle host allowlists, while strict-dynamic lets trusted scripts load additional scripts in modern browsers.
Jasmine: Adding custom matchers
Custom Jasmine matchers add reusable expectations for tests, including tailored pass/fail logic and clearer failure messages.
Use find_in_batches or find_each to deal with many records efficiently
Processing large record sets can exhaust memory when loading everything at once. find_in_batches and find_each keep memory usage lower for long-running data updates.
CSS: Combining different length units with calc()
calc() enables CSS values to combine percentages and absolute units, such as sizing an element to fit a container with fixed side margins.
How to fix: irb / rails console randomly crashing
irb and rails console can crash unpredictably because of multi-line autocomplete; disabling it may stop the failures.
Sidekiq 7: Rate limiting with capsules
Sidekiq 7 capsules let queues run with separate concurrency limits, useful for protecting apps or APIs from too many parallel jobs.
Using the Oklch color space to generate an accessible color palette
Oklch keeps derived colors aligned as a base color changes, preserving contrast more reliably than RGB or HSL for accessible palettes.
Understanding database Indexes in PostgreSQL
Unused and duplicate database indexes can slow writes, waste storage, and complicate maintenance in PostgreSQL; SQL one-liners help identify candidates for cleanup.
How to create a multiline map in SASS/SCSS
Large Sass/SCSS maps become hard to read when they grow, and multiline map syntax is unsupported in .sass. Using .scss avoids parser errors.
Rubymine: Configure CTRL + ALT + SHIFT + c to work with "Test Source Roots"
RubyMine test navigation depends on marking test folders as Test Sources Root; remapping CTRL + ALT + SHIFT + c can copy repository-relative paths like spec/foo_spec.rb instead of foo_spec.rb.
Webpacker: Configuring browser compatibility
Browser support in Webpacker depends on both Babel and UglifyJS; mismatched settings can break legacy browsers like IE11 even when JavaScript is transpiled.
Do not use transparent PNGs for iOS favicons
Transparent apple-touch-icon images on iOS turn black in Safari, so solid backgrounds prevent ugly home-screen and bookmark icons.
How Haml 6 changes attribute rendering, and what to do about it
Haml 6 renders most custom attributes verbatim, so falsy values no longer remove them. Boolean attributes keep special handling, and Haml::BOOLEAN_ATTRIBUTES can extend that list.