Tony
Tony

Reputation: 19126

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

Upvotes: 63

Views: 46881

Answers (1)

gdelfino
gdelfino

Reputation: 11181

I do it this way:

= link_to image_tag( 'header.jpg'), 'http://www.google.com'

Upvotes: 125

Related Questions