我想把下面的代码翻译成link_to helper。怎么做呢?
<a href="#"><i class="fa fa-twitter"></i></a>
您可以使用link_to
的块格式重新创建上面的链接,如下所示:
<%= link_to "#" do %>
<i class="fa fa-twitter"></i>
<% end %>
希望有帮助!