Search code examples
ruby-on-railstwitter-bootstrap-rails

Rails link_to syntax error: unexpected ',', expecting ')'


I recently attempted to add bootstrap-sass to my rails app, and it seemed to have broken all my links (the links were fully functional before installing the bootstrap-sass gem). I am using ruby 1.8.7.

A sample link I have is:

<%=link_to image_tag ("right_arrow.png", :size => '20x20'), project_step_path(@project, @step.number+1) %>

The error I am getting is:

syntax error, unexpected ',', expecting ')' ...o(image_tag ("right_arrow.png", :size => '20x20'), project_s...

Anyone know how to fix this?


Solution

  • There is an extra-space after image_tag.

    image_tag ("right_arrow.png", :size => '20x20')
    

    It should be

    image_tag("right_arrow.png", :size => '20x20')