Bring in changes from Rails guide

Closes #1 and #2.