update syntax to ruby 1.8 and rails 2