我想将其转换为 ruby on rails 代码:
<a href="#"><span>Log out</span><%= image_tag("images/log-out.png") %></a>
尝试这个时:
<%= link_to image_tag("images/log-out.png", :border => 0 ), destroy_user_session_path, :method => :delete %>
我正在获取图像上的链接。但我还需要用文本添加跨度。我试过了,但它不起作用:-
<%= link_to "<span>Log out</span>"+image_tag("images/log-out.png", :border => 0 ), destroy_user_session_path, :method => :delete %>