0

I have upgraded my localhost version of ruby from 1.8.7 to 1.9.2 and I got some errors in my templates. For example, in ruby 1.8.7 I use following:

    <%= link_to ((image_tag 'image.png', :alt => 'bla bla bal'),
            url_for(root_url), :id => 'identifier')%>

This works me fine on ruby 1.8.7, but if I switch to ruby 1.9.2, I'll get this error:

syntax error, unexpected ',', expecting ')'
                url_for(root_url), :id => 'identifier'));@output_buffer.safe_concat('

What is here for a problem? And could anyone help me, please, how to fix it?

lucapette
  • 20,564
  • 6
  • 65
  • 59
user984621
  • 46,344
  • 73
  • 224
  • 412
  • 2
    ok, so it looks the only right answer it `<%= link_to image_tag('image.png', :alt => 'bla bla bal'), root_url, :id => 'identifier'%>`. It works on the both versions, **1.8.7** and **1.9.2**. – user984621 Nov 08 '11 at 19:02
  • Please add your comment as an answer and mark it as accepted. – lucapette Dec 03 '11 at 14:18

1 Answers1

0

ok, so it looks the only right answer it <%= link_to image_tag('image.png', :alt => 'bla bla bal'), root_url, :id => 'identifier'%>. It works on the both versions, 1.8.7 and 1.9.2

Paul Sweatte
  • 24,148
  • 7
  • 127
  • 265