link_to image tag. how to add class to a tag

前端 未结 11 1848
失恋的感觉
失恋的感觉 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:21

    I tried this too, and works very well:

          <%= link_to home_index_path do %>
          
    .BAR
    <% end %>

提交回复
热议问题