updated to user rails 4