Based off the mad decent rails book