patiently is now a gem

patiently helpers are now packaged as the patiently gem, with configurable retries and timeouts for feature and system specs.

How to test a controller concern with rspec-rails anonymous controllers

RSpec controller concerns can be exercised with anonymous controllers, letting shared authorization behavior be tested through real requests without messy dummy routes or rebuilt stacks.

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.

Gem development: recommended gem metadata

Gem metadata can add source, bug tracker, changelog and MFA links to the RubyGems page, improving discoverability and security signals.

ActiveRecord: Specifying conditions on an associated table

ActiveRecord queries can filter on columns from an associated table without raw SQL, using subqueries, ID plucking, traverse_association, or joins.

current_transaction.after_commit is handy

Avoid sending side effects before a database commit; current_transaction.after_commit and after_rollback defer work until the transaction outcome is known, without a global callback.

How to balance wrapping flex rows

flex-wrap: balance evens out wrapped flex rows so wide layouts avoid lonely items and large gaps, with wrap as a safe fallback for older browsers.

Embedding Pannellum (360° panorama viewer) in an esbuild/Rails app

Pannellum offers a lightweight equirectangular panorama viewer for Rails and esbuild, but its npm package only attaches window.pannellum; container sizing and blob: CSP need care.

PostgreSQL: WITH Queries (Common Table Expressions)

CTEs simplify bulky PostgreSQL queries by factoring subqueries into reusable named result sets, improving readability and supporting SELECT, INSERT, UPDATE, and DELETE.

How DECIMAL columns deal with numbers exceeding their precision or scale

DECIMAL overflow and rounding differ by database: some systems reject out-of-range values, while others clamp or round to the nearest representable number.

Project management best practices: Project team responsibilities

Clear role separation in larger projects reduces coordination gaps, delays, and ownership confusion. The project lead drives delivery and technical decisions; the PM handles customer-facing requirements and acceptance.

How to detect how a page was loaded in JavaScript

Navigation timing can reveal whether a document was opened, reloaded, restored from history, or prerendered. Single-page apps keep the same navigation type after client-side route changes.

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.

Self-expiring URLs with Apache

Signed URLs for private uploads can expire without routing downloads through Rails, improving speed while reducing the risk of permanent access.

Jasmine: Testing AJAX calls that manipulate the DOM

AJAX DOM updates are hard to test when requests are asynchronous and the target element is missing. jasmine-ajax, jasmine-fixture, and done make network mocking and DOM setup possible.

Jasmine: Mocking ESM imports

Imported ESM functions are hard to spy on in Jasmine; several workarounds keep call counts testable, including wrapper objects, dependency injection, and test runners with module mocking.

Auto Mode in Claude Code

AI-mediated permission checks in Claude Code reduce confirmation fatigue while blocking risky writes, credential access, and unsafe package installs.

Restricting Claude Code's sandbox configuration

Claude Code sandbox access to the whole home directory can expose private files; tighter filesystem rules limit reads while keeping tools and package installs working.

Claude Code Sandbox

Code execution in Claude Code can be isolated to reduce permission prompts and limit file and network access, but it is not a security boundary.

Capistrano: Less deploy output, better overview

Capistrano deploys are noisy by default; a custom formatter reduces console clutter while keeping errors visible and the full log in log/capistrano.log.

Updated: How to apply transparency to any color with pure CSS

Pure CSS can make any color transparent without extra assets or scripting, including a variant using Relative Color Syntax.

SVGO: SVG Optimizer

SVG files often contain comments, metadata, and hidden elements that inflate size. SVGO reduces them while preserving proper scaling with viewBox.

Capybara can find links and fields by their [aria-label]

Capybara can locate form fields and links by aria-label, improving accessibility-aware test selectors when visible labels are missing.

Rails: Do not load frameworks you don't need

Loading every Rails framework increases startup time and memory use; disabling unused railties and gems keeps apps lighter and avoids unnecessary configuration.