link_to image tag. how to add class to a tag

前端 未结 11 1770
失恋的感觉
失恋的感觉 2020-12-22 20:53

I am using link_to img tag like following

<%= link_to image_tag(\"Search.png\", :border=>0, :class => \'dock-item\'), 
:action => \'search\', :co         


        
11条回答
  •  有刺的猬
    2020-12-22 21:22

    Best will be:

    link_to image_tag("Search.png", :border => 0, :alt => '', :title => ''), pages_search_path, :class => 'dock-item'
    

提交回复
热议问题