Rails 3 - link_to with image_tag + text

后端 未结 4 1909
隐瞒了意图╮
隐瞒了意图╮ 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:32

    Try this.

    <%= link_to image_tag('/images/image.png') + "some extra text", url_for({:controller => 'controller_name', :action => 'action_name'}), :class => 'quick', :remote => true %>
    

提交回复
热议问题