我已經開發了使用摺疊引導的Ruby on Rails網頁。 與Haml我已經嘗試如下。 但也有一些意想不到的錯誤。使用HAML摺疊手風琴時出現意外錯誤
.accordion-group
.accordion-heading
%according-toggle{"data-toggle" => "collapse", "data-target"=>"#{heading}"}
= link_to heading, "#{heading}"
.accordion-body.collapse.in{:id => "#{heading}"}
.accordion-inner
-items.each do |item|
%li{ :class => (params[:controller] == item[:controller] ? "active" : "") }
= link_to item[:path] do
- if item[:data_icon]
%span{ :class => "nav-icon", :data => {"icon" => "#{item[:data_icon]}".html_safe}}
%span{ :class => "nav-text"}
= "#{item[:name]}"
- else
= "#{item[:name]}"
語法錯誤,意想不到的keyword_ensure,期待keyword_end ...:Util.html_safe(_erbout);保證; @haml_buffer = @haml_buffer .... 這是一個錯誤信息 –