The numericality validator does not care about your BigDecimal precision
validates_numericality_of converts values to Float or integer, so high-precision BigDecimals can round and fail comparisons unexpectedly.
What edge_rider offers you
ActiveRecord relation helpers reduce object instantiation, simplify association traversal and preloading, and bridge Rails version differences with a unified API.
Git: Advisory for cherry-picks to production branches
Cherry-picking individual commits to a production branch can create later merge pain because Git treats the same change as different history. Merge production back into main after each cherry-pick.
Be careful when using buttons without a "type" attribute
Buttons without a type attribute default to form submit behavior, so pressing Enter can trigger the wrong action. Set type="button" for non-submitting buttons.
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.
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.