redoing the sample app in rails 4