Hi! I'm Avdi Grimm, and this is my software development blog. More...
Books and Screencasts
Small plates of gourmet Ruby code.
Watch me build an app from scratch.
Objects on Rails
A developer notebook on applying classic Object-Oriented principles to Ruby on Rails projects.
The definitive guide to exceptions and failure handling in Ruby.
Tag Archives: rails
How I avoid finding myself in database bizarro world while testing Rails apps. Continue reading
Part two in my “live”-style screencast series is now available! Watch me code up a small web app from scratch using test-driven development. In this hour-long episode, I switch from integration testing to unit testing in order to drive out … Continue reading
NullDB, for those who don’t know, is a null backend for ActiveRecord. Unlike RSpec’s stub_object, rather than raise an exception on DB access, will NullDB DB interactions simply become no-ops. This is handy for things like testing after_save hooks in … Continue reading
UPDATE: Objects on Rails is now complete and freely available online. Often, at conferences and users group meetings, I find myself discussing the intersection of Ruby on Rails, Object-Oriented development, and Test-Driven Development, and I’ll mention something like “I prefer to develop my … Continue reading
Avoiding silent truncation of your model fields requires putting length validations on them. But this can introduce duplication of knowledge. In this post I demonstrate how to pull limit information directly from the DB into your model validations. Continue reading
Designing HTML views is an iterative, interactive process by nature. And anything that slows down the iterations, slows down development. I was working on a form recently where the steps to show it went something like this: Go to the … Continue reading
DCRUG First off, I had a great time at DCRUG last night. I enjoyed getting a peek at Jeff Casimir‘s “pre-alpha” presentation on Rails views. And Joel Strait‘s live demo of BEATS was very cool. I did something a little … Continue reading
A quick guide to getting up and running with the Erector templating library. EDIT: Here’s the fork and branch I used to get it working.