- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
<%
def out_categories(parent, level)
if (categ = @categories.where(parent_id: parent))
categ.each do |cat|
%>
<div style='margin-left:<%=level * 20%> px'><%= cat.title %></div>
<%
level += 1
out_categories(cat.id, level)
level -= 1
end
end
end
out_categories(nil, 0)
%>
Follow us!