first pass at fixing the errors with rails 4