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.

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.

Rails: Assigning associations via HTML forms

Rails forms can assign tag associations in several ways, from array columns to join models; nested attributes keep tag changes in one transaction.

Rails cache connection settings

Redis cache connections in Rails can be tuned with custom timeouts, reconnect behavior, and error handling to avoid slow cache operations and missed connection failures.

Simple Form: Rendering errors without an appropriate attribute

ActiveRecord base errors do not render in Simple Form by default; they need explicit handling to display form-wide validation messages.

Project management best practices: Technical debt summary

Prioritizing refactoring and upgrade work is harder in larger projects; a maintained technical-debt summary helps compare effort, customer value, and developer value.

How not to turn your application into a spam relay

Abused sign-up and password-reset emails can turn applications into spam relays when user input is reflected in messages. CAPTCHAs, rate limits, and avoiding arbitrary text reduce the risk.

JavaScript: Detecting the end of native smooth scrolling

Native smooth scrolling has no built-in completion signal; scrollTo() and scrollIntoView({ behavior: 'smooth' }) do not return promises, so a scroll idle timeout can wait for the animation to finish.

Rails: Rescuing exceptions for specific exception types

Rails can map selected exceptions to non-500 responses and suppress error monitoring noise, such as returning 404 for missing records or denied access.

Custom RSpec matcher for allowed values (or assignable_values)

Custom RSpec matcher for checking allowed association values, useful when validating assignable_values on model associations.

Beware when using ActiveSupport time and date calculation methods

Duration#ago and Duration#from_now return ActiveSupport::TimeWithZone, which can introduce unexpected timezone behavior when an app assumes local or timezone-unaware dates.

Rails: Your index actions probably want strict_loading

Strict loading in index actions catches N+1 queries when views touch unpreloaded associations, causing test failures instead of hidden database hits.

Rails: How to test the parsed response body

Rails response tests can parse bodies by MIME type with parsed_body, replacing manual JSON.parse(response.body) in many cases and enabling cleaner assertions.

How to exclusively lock file access in ruby

Prevent race conditions when multiple Ruby processes read or write the same file by using flock for exclusive locking, optionally via a companion .lock file.

SASS: Reusing styles from other files

@extend reuses Sass selectors, but multi-file bundling can duplicate imported styles and break the expected selector merging.

How to enable template coverage support for simplecov

Template and eval coverage in Ruby can be tracked with SimpleCov from Ruby 3.2 onward, including Haml and ERB templates.

Rails migration: Changing a column type without losing the content

Rails migrations can change column types without dropping data by using custom SQL casting, but rollback may fail when values cannot be converted.

Creating a sample video with ffmpeg

Create tiny test videos with ffmpeg by lowering resolution, framerate, and bitrate to keep files small while preserving duration.

Heads up: Deployment with newly generated SSH key (using ED25519) might fail

Capistrano deployments can fail with ssh-ed25519 keys because net-ssh needs ed25519 and bcrypt_pbkdf; stale host fingerprints in ~/.ssh/known_hosts can also block access.

Issue Checklist Template

Personal issue workflow checklist for moving features from start to review, with branch, commit, merge request, testing, and staging handoff steps.

Rails: Using database default values for boolean attributes

Boolean fields in Rails are safer with database defaults and NOT NULL constraints; application-level fallbacks are brittle, especially for tri-state values and instance-dependent defaults.

Configuring RubyGems to not install documentation by default

Gem installations waste time generating local docs that are rarely used; disabling documentation by default speeds up manual installs with gem and ~/.gemrc.

How to turn images into inline attachments in emails

External images in emails can fail in some clients; inline attachments with Rails and attachments.inline keep images visible, but turn messages into multipart emails and use content IDs.

Rails: Encrypting your database information using Active Record Encryption

Rails 7 app data can be stored as encrypted attributes with deterministic lookup support, but search, grouping, and bulk updates become limited.