0
我在我的索引頁中有以下條件,我喜歡用手風琴包裝。如何在引導式手風琴周圍纏繞我的Ruby on Rails條件
index.html.erb
<% Category.top_level.each do |cat| %>
<div><%= cat.name %></div> #=>This lists top level categories
<ul>
<% cat.lawyers.each do |law| %>
<li>
<%= law.name %> #=>This lists lawyers under top level categories
</li>
<% end %>
</ul>
<% cat.sub_categories.each do |subcat| %>
<ul>
<%= subcat.name %> #=>This lists corresponding subcategories under the top level categories
<ul>
<% subcat.lawyers.each do |law| %>
<li><%= law.name %></li> #=>This lists lawyers that are under corresponding subcategories
<% end %>
</ul>
</ul>
<% end %>
<% end %>
我的代碼圖形視圖和正常工作
什麼,我喜歡做
我喜歡用Bootstrap Accordion來實現它。