Updated app for rails 4