rebuilding an exercise in rails that we previously made in sinatra