Notes based on a lecture by vaz at Lighthouse Labs, Vancouver.
Note: this was based on Rails 4, and while most things haven't changed much and this still covers the concepts pretty well, make sure you've got the Rails Guide docs for the version you're actually using and keep in mind some things may have changed.