demp_app from railstutorial.org