0
我已經建立了類似下面glyphicons:Rails的Haml的:的link_to glyphicon列表項 - 非法嵌套
= link_to edit_user_registration_path(pin.user_id), class: "btn btn-default" do
%span.glyphicon.glyphicon-cog
然而,當我把它放在%裏,我得到一個非法嵌套錯誤:
%ul.nav.navbar-nav.navbar-right.custom
%li= link_to edit_user_registration_path(pin.user_id), class: "btn btn-default" do
%span.glyphicon.glyphicon-cog
我收到以下內容:
Illegal nesting: content can't be both given on the same line as %li and nested within it.
如何解決此問題?