Better numeric inputs in desktop browsers
Desktop number fields accept scientific notation, arrow-key changes, wheel scrolling, and stray letters, causing accidental edits and validation errors.
The TCF 2.0 (Tranparency and Consent Framework) standard, and what you should know about it
GDPR-compliant ad consent requires a registered CMP, consent strings, and __tcfapi so vendors can verify user choices before serving personalized ads.
Enabling YJIT
Ruby's JIT compiler needs a YJIT-enabled build and explicit activation; Rails 7.2+ enables it after boot, usually making it active already.
Local development with SSL and Puma
Local HTTPS for Puma development needs a trusted certificate and SSL binding so Rails runs on https://localhost:3000 without browser warnings.
ActiveRecord: String and text fields should always validate their length
String and text columns need model length validation to prevent database exhaustion and avoid runtime SQL errors on oversized input.
Use <input type="number"> for numeric form fields
Numeric form fields on mobile get digit-focused keyboards, locale-aware decimal display, and consistent point-based values in JavaScript and form submission.
Using the ActiveSupport::BroadcastLogger
ActiveSupport::BroadcastLogger sends one log message to multiple outputs, useful for writing Rails and Sidekiq logs to both STDOUT and files.
Error handling and reporting with Rails
Rails exception handling can either crash requests, hide actionable errors, or spam trackers; ExceptionApp, DebugExceptions, and the error reporter shape responses, logging, and notifications.
Baseline npm security
Compromised npm packages are increasingly used for supply-chain attacks and malware. Cooldown windows, blocked git subdependencies, disabled scripts, and safer npx usage reduce exposure.
How to auto-rotate images before OCR or computer vision tasks
Rotate scanned pages to upright before OCR or vision LLM processing; Tesseract OSD with sector probing improves orientation detection when pages are sideways, upside down, or noisy.
Customize your Bash prompt
Bash prompt customization relies on PS1 escape sequences, colors, and command output to show user, host, directory, git branch, and status information.
Deliver Paperclip attachments to authorized users only
Private Paperclip downloads need restricted storage or hashed URLs to keep attachments away from public access. A controller-based delivery path or secret-based paths reduce exposure.
Test your application's e-mail spam scoring with mail-tester.com
Check outbound mail for spam filters and deliverability issues with mail-tester.com; a score around 9/10 is usually fine, while plain-text bodies and proper DNS help avoid false positives.
Capistrano: creating a database dump if migrating
Create a database dump only when Capistrano will run Rails migrations, using conditional migration checks and a deploy hook.
Upgrade guide for moving a Rails app from Webpack 3 to Webpack 4
Webpacker 4 and Babel 7 change config files, package names, asset paths, and polyfill imports when upgrading a Rails app from Webpack 3.
whenever: Installing cron jobs only for a given Rails environment or Capistrano stage
Conditional cron jobs in whenever can target only one Rails environment or Capistrano stage, avoiding unwanted tasks on other deployments.
Gatekeeping: Guide for gatekeeper
Project code is reviewed before staging to catch client rejections early and keep changes maintainable. Gatekeepers approve or reject merge requests and decide whether a review is needed.
Using Low-Level Prompts for High-Accuracy AI Coding
Precise, low-level prompts and tight context improve AI code edits across files; structured keywords, reusable patterns, and early review reduce guesses and errors.
Capybara: Most okayest helper to download and inspect files
Reliable file-download testing in Capybara, including filename, content type, disposition, and text inspection across Selenium and Rack::Test without leaving the page.
How to make Webpacker compile once for parallel tests, and only if necessary
Compile Webpacker assets once in parallel test runs and skip recompilation when files are unchanged, avoiding duplicate work and Capybara timeouts.
MySQL replication how-to
Setting up MySQL master-slave replication is error-prone, especially with initial data dumps, binary log positions, and SSH tunnels for remote connectivity.
Capistrano: Configure environment specific array attributes
Capistrano can adjust array-style settings per environment, letting deployments add or remove linked files without duplicating the base configuration.
Lightning Talk: Coverage based Test Case Prioritization in Ruby on Rails
CLI test case prioritization for Ruby on Rails using coverage data can surface failing specs earlier and reduce regression testing time.
Using CSS transitions
Browser-native animations smooth UI state changes without JavaScript, with short durations and careful easing to avoid sluggish hover effects.