Rails ruby href 与 link_to 的转换

xiaoxiao · May 19, 2013 · Last by xiaoxiao replied at May 20, 2013 · 2158 hits

这个语句怎么转成 link_to 表达 我只能转成 <%= link_to image_tag('shortcuts_12.png', :class=>'menu-icon'), new_boy_path %>

你这就属于明显没看 link_to 的文档了

<%= link_to path do %>
  <%= image_tag '' %>
<% end %>
You need to Sign in before reply, if you don't have an account, please Sign up first.