update app to work with rails 4