63

I have something like this in application.html.haml:

#header
    = image_tag("header.jpg")

How do I make that link to www.google.com, for example?

Thanks

Tony
  • 18,776
  • 31
  • 129
  • 193

1 Answers1

125

I do it this way:

= link_to image_tag( 'header.jpg'), 'http://www.google.com'
gdelfino
  • 11,053
  • 6
  • 44
  • 48