change rails to ruby syntax