Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I make an image link tag using haml in Rails?

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

like image 386
Tony Avatar asked Jul 29 '09 19:07

Tony


1 Answers

I do it this way:

= link_to image_tag( 'header.jpg'), 'http://www.google.com' 
like image 199
gdelfino Avatar answered Sep 22 '22 00:09

gdelfino