Auto-generating plain-text bodies for HTML e-mails in Rails apps
HTML e-mails in Rails need a plain-text part to avoid spam penalties; premailer-rails can generate it automatically and be tuned for line length and formatting.
Regular tasks for long-running projects
Long-running projects need regular upkeep to avoid stale dependencies, growing data, and bloated storage that raise costs and slow applications.
Rails: Prefer parsing dates with Date.strptime()
Date.parse guesses date formats and can accept invalid input, producing unexpected dates. Date.strptime validates against an explicit pattern and avoids ambiguous parsing.
How to examine an unknown Ruby object
Inspect unfamiliar Ruby objects during debugging by listing methods, filtering names, and checking instance variables when source code is unavailable.
A quick introduction to CORS
Cross-origin browser requests need explicit server approval; otherwise the Same-Origin Policy blocks access. CORS uses Origin and Access-Control-Allow-Origin headers, with preflight checks for some methods.
Raising JavaScript errors in Ruby E2E tests (RSpec, Cucumber)
Selenium E2E tests can miss frontend JavaScript errors because browser console logs do not fail specs by default. BrowserConsole raises on console errors and supports ignore rules.
Pretty commit messages via geordi
Generate polished Git commit messages from Linear stories, including issue ID, title, and link, using geordi commit and a .geordi.yml repository config.
Geordi: How to rerun failed features
Rerun failing Cucumber scenarios automatically or from tmp/parallel_cucumber_failures.log when a test run leaves broken features behind.
Ruby: How to use prepend for cleaner monkey patches
prepend makes Ruby monkey patches cleaner by inserting an extension before the original implementation, so super still reaches it and ancestor chains stay readable.
HTML forms with multiple submit buttons
Forms can offer multiple submit actions such as save, accept, or reject, but the server must know which button was pressed. formaction sends each button to a different URL.
Best practices: Large data migrations from legacy systems
Large legacy data migrations need deep source-system understanding, fast failure, dedicated logging, and traceable migration metadata to keep long-running imports debuggable and verifiable.
Project management best practices: The story tracker
The tracker acts as the source of truth for project work, separating developer and non-developer stories and keeping developer items fully specified before backlog intake.
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 make changes to a Ruby gem (as a Rails developer)
Ruby gems need manual file loading, multi-version support, and their own release workflow, unlike Rails apps. Safe changes depend on understanding structure, tests, versioning, and packaging.
Optimizing images for the web
Fast webpages need smaller image files without visible quality loss; resizing, stripping metadata, and using formats like WebP can greatly reduce size.
Devise: Invalidating all sessions for a user
Stolen Rails session cookies can remain usable after logout with Devise. Invalidating them requires changing the authentication salt, resetting the password, or storing sessions server-side.
Whenever: Don't forget leading zeros for hours!
Whenever can misread 24-hour times without a leading zero, turning 3:00 into 3pm instead of 3am. chronic_options can switch parsing to a 24-hour clock.
When you want to format only line breaks, you probably do not want `simple_format`
Rendering text with only line-break handling can avoid simple_format's HTML-preserving side effects. A small helper or white-space: pre-wrap keeps output predictable.
Don't sum up columns with + in a SQL query if NULL-values can be present.
+ arithmetic in SQL turns the whole result NULL when any operand is NULL; SUM and COALESCE(..., 0) avoid silent loss of totals.
Writing strings as Carrierwave uploads
CarrierWave needs a filename for string or stream uploads through ActiveRecord; a small StringIO wrapper with original_filename avoids TypeError and works with Zeitwerk.
HTML5: disabled vs. readonly form fields
Noneditable HTML form controls behave differently with disabled and readonly: submission, focus, and tab order change, and browser quirks can affect fieldset descendants.
ss: How to show listening ports
ss lists open TCP and UDP ports and the processes bound to them, making it easier to find what is listening on a local machine.
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.
Carrierwave: Deleting files outside of forms
Removing CarrierWave attachments outside forms can affect the database and file storage differently. update!(remove_avatar: true) matches normal form behavior and is usually the safest choice.