Rails 3 - link_to with image_tag + text

后端 未结 4 1910
隐瞒了意图╮
隐瞒了意图╮ 2021-02-04 01:56
<%= link_to ((image_tag \'image.png\'), 
        url_for({:controller => \'controller_name\', :action => \'action_name\'}), 
            :class => \'quick\',         


        
4条回答
  •  误落风尘
    2021-02-04 02:31

    I used the following and it works just fine:

    <%= link_to image_tag("logo.jpg"), controller: 'welcome' %>
    

提交回复
热议问题