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 "linky", "/", id: "logo" %>
如果您不希望有一个值,您可以省略“linky”,但保留字符串声明,如:
<%= link_to "", "/", id: "logo" %>
这返回
<a id="logo" href="/">linky</a>
会不会是:
<%= link_to '', root_path, :id => "logo" %>