Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <% cache(:action => :sumpin, :id => @root_blah.id, :part => 'topfoos') do -%>
- <ul class="topfoos">
- <% position = 1 %>
- <% @top_foos_this_blah.each do |foo| -%>
- <li class="top<%= position %>">
- <%= link_to truncate(foo.title, 20), {:action => :foo_detail,
- :id => foo} %>
- </li>
- <% position += 1 %>
- <% end -%>
- </ul>
- <% end # cache topfoos -%>
- <% cache(:action => :sumpin, :id => @root_blah.id, :part => 'blahs') do -%>
- <ul class="blahs">
- <% position = 1 %>
- <% @blahs.each do |blah| -%>
- <% @blah_id = "blah_" + blah.id.to_s %>
- <li id="<%= @blah_id %>" class="<%= cycle('dk', 'lt') %>">
- <% if blah.children.size > 0 -%>
- <%= link_to_remote blah.title, {:url => {:action => :list,
- :id => blah},
- :method => :get},
- {:class => 'blah'} %>
- <% else -%>
- <%= link_to blah.title, {:action => :list_foos,
- :id => (blah.title_urlfriendly + '.html')},
- {:class => 'link'} %>
- <% end -%>
- </li>
- <% position += 1 %>
- <% end -%>
- </ul>
- <% end # cache blahs -%>
Add Comment
Please, Sign In to add comment