changed back to rails 3