Rails API tutorial from http://apionrails.icalialabs.com/