Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个问题中的标签列表..现在我想给每个标签一个链接,每个标签中都有相应的问题标签:
<%= link_to question.tags.map { |t| t.name }.join(" "), @tag %> </td>
试试这个代码
<% question.tags.each do |t| %> <%= link_to(t.name, t) + " " %> <% end %>