fix syntax error on Rails3