main sample_app from railstutorial.org version 4.0