RailsPanel chrome extension

Chrome panel for inspecting Rails log data, including parameters, response times, view rendering, and database requests.

Ollama: Strip image data from VCR recorded requests

VCR cassettes can bloat with base64-encoded vision payloads and leaked Basic Auth credentials; sanitizing request bodies and custom matching keep recordings small and playback reliable.

Rails jQuery UJS: Now Interactive

We can now plug into every facet of the Rails jQuery UJS adapter, binding to custom events, and even customizing internal functions, without hacking or monkey-patching the rails.js file itself.

Rails 3 Remote Links and Forms: A Definitive Guide

Thanks to habits engrained by Rails 2’s link_to_remote and remote_form_for, we expect that Rails 3 would also handle the AJAX response for our remote links and forms. But it doesn’t; it leaves that for you.

The dangers of url_for in Rails applications

In a great post about named routes in Rails, path vs. url, Viget Labs ponders which variant is best used.<br />
<br />
Most often we use foo_path, which when used in Rails URL helpers will generate a relative path, where foo_url generates a full URL. In most cases the path makes most sense, but not always.

Rethinking Rails 3 Controllers and Routes | Free PeepCode Blog

The Rails router has been written and rewritten at least four times2, including a recent rewrite for the upcoming Rails 3. The syntax is now more concise.<br />
<br />
But never mind making it shorter! It’s time for a final rewrite: Let’s get rid of it altogether!

BlogFish: Ruby on Rails Security

Recently I've been made aware of people inside US Government organizations using my Ruby on Rails Security presentation as an excuse to limit Ruby on Rails adoption and projects inside those organizations.

Verifying doubles in RSpec 3

Safer test doubles in RSpec 3 verify stubbed methods and argument counts, catching interface mismatches while keeping isolated specs fast.

PSA: Be super careful with complex `eager_load` or `includes` queries

eager_load and includes can explode 1-n association queries into huge cross products, wasting memory. preload uses separate queries and avoids the row multiplication.

Jasmine: Fixing common errors during initialization

Jasmine boot failures can stem from browser/module detection issues, causing jasmineRequire or getJasmineRequireObj() errors in Webpacker and esbuild setups.

Ruby: How to determine the absolute path relative to a file

Use File.expand_path with __dir__ or __FILE__ to build file paths that stay correct regardless of the caller’s working directory.

Rails for Zombies

Learning Rails for the first time should be fun, and Rails for Zombies allows you to get your feet wet without having to worry about configuration. You'll watch five videos, each followed by exercises where you'll be programming Rails in your browser.

How to list updateable dependencies with Bundler and Yarn

List outdated gems and packages that can be upgraded, with filters for allowed versions and dependency groups to narrow bulk updates.

current_transaction.after_commit is handy

Avoid sending side effects before database writes are durable; current_transaction.after_commit and after_rollback run work only after commit or rollback, even inside nested transactions.

Use Time.current / Date.current / DateTime.current on projects that have a time zone

Time zone-aware projects need Time.current, Date.current, and DateTime.current so values persist correctly; Time.now can write timestamps with the wrong zone.

Resolve Aspell errors with your Rails application

If you get an error message like that you are missing the Aspell files a specific language:

No word lists can be found for the language "de"

Solve it by installing the proper package, e.g. on Ubuntu:

sudo apt-get install aspell-de

Create an application with an older Rails version

sudo gem install rails --version="=1.2.3"
rails _1.2.3_ new-project-folder

What's new in edge Rails: Active Record enums

Integer-backed model attributes can be queried by symbolic names, making state handling clearer and avoiding hard-coded numeric values.

Obfuscating data in Rails applications for screenshots and demonstrations

Real data makes demos and screenshots look convincing, but names and values need masking to avoid exposing sensitive information. Faker can quickly replace personal details with plausible placeholders.

An introduction to Hybrid search

Hybrid search combines vector retrieval and BM25 keyword search to catch paraphrases and exact terms, improving recall when either method alone misses relevant documents.

You don't need a vector database to build a RAG system

RAG can work with ordinary search: relevant results are placed into the prompt, and vector embeddings are only needed when synonyms and semantic matches become the main gap.

Silencing Deprecation Warnings in Rspec

Deprecated Ruby tests can flood RSpec output with warning noise. A narrower way to quiet them avoids hiding warnings from dependencies.

When should you use DateTime and when should you use Time?

Choosing the wrong Rails date and time type can cause subtle bugs in storage, comparisons, and timezone handling. Time suits most application timestamps; DateTime is for specialized calendar use.

Always, always declare your associations with symbols

Active Record associations must be declared with symbols, especially in metaprogramming, or newer Rails versions raise an ArgumentError.