我想产生这个链接:
<a href="/settings" class="button"><span class="magnifier icon"></span>Search</a>
所以据我所知,我必须转换
<%= link_to "Upgrade",:settings,:class => "button" %>
到了一个区块,但当我这样做时:
<%= link_to "Upgrade",:class => "button" do %> <span class="magnifier icon">Search</span> <% end %>
它给了我以下错误:
undefined method `stringify_keys' for :settings:Symbol
但是,当我这样做时:<%= link_to“Upgrade”,:settings,:class => “按钮”%>它完美地运作.
如何将其转换为块?