following the Rails Deep Dive book