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

后端 未结 1 1004
谎友^
谎友^ 2020-12-24 10:47

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

1条回答
  •  眼角桃花
    2020-12-24 11:07

    I do it this way:

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

    0 讨论(0)
提交回复
热议问题