<%= link_to "New Forum/Category", new_forum_path %>
<% @categories.each do |category| %>
<%= category.title %> <%= link_to "New Forum", new_forum_path %> <%= link_to "Edit Category", edit_forum_path(category) %> <%= link_to "Delete Category", forum_path(category), :confirm => "Are you sure you want to delete this category?", :method => :delete %>
<% if category.forums.size > 0 %>
<% category.forums.each do |forum| %> <% end %>
Forum Topics Posts Last Post
<%= image_tag 'ruby.png' %> <%= link_to forum.title, forum_path(forum) %>
<%= forum.description %>
<%= forum.topics.size %> <%= forum.posts.size - forum.topics.size %> <% if forum.posts.size > 0 %> <%= forum.posts.last.created_at %>
<%= forum.posts.last.user.username %> <% else %> No Topics / Posts <% end %>
<% else %>
There are currently no forums.
<% end %>
<% end %>