changed to rails 4