troszkę się zagubiłem bo teraz mam coś takiego:
index.html.erb w /views/posts wyświetlam posty
[code]<%= render :partial => “header” %>
<%= render :partial => “menug” %>
<div id="content">
<div id="primaryContentContainer">
<div id="primaryContent">
<% @posts.each do |post| %>
<h2><%=h post.name %></h2>
<p class="small">Kategoria: <%=h post.cat.name %></p>
<p><%=h post.title %></p>
<p><%=h post.content %></p>
Komentarzy: <%=h post.comments.count %>
<%= link_to 'Show', post %></td>
<%= link_to 'Edit', edit_post_path(post) %></td>
<%= link_to 'Destroy', post, :confirm => 'Are you sure?', :method => :delete %></td>
<% end %>
<%= link_to ‘New post’, new_post_path %>
Lista wpisów
<%= render :partial => "listapostow" %>Lista kategorii
<%= render :partial => "listakategori" %><div id="content">
<div id="primaryContentContainer">
<div id="primaryContent">
<%=h @post.name %>
Kategoria: <%=h @post.cat.name %>
<%=h @post.title %>
<%=h @post.content %>
Komentarze
<% @post.comments.each do |c| %>Komentarz dodał: <%=h c.commenter %>
<p><%=h c.body %></p>
<hr/>
<% end %>
<%= link_to ‘Edit Post’, edit_post_path(@post) %> |
<%= link_to ‘Back to Posts’, posts_path %>
<%= link_to ‘Manage Comments’, post_comments_path(@post) %>