Listing posts

<% @posts.each do |post| %>

<%= link_to post.title, post %>

created on <%= post.created_at %>

<%= link_to 'Edit', edit_post_path(post) %> | <%= link_to 'Destroy', post, :confirm => 'Are you sure?', :method => :delete %>

<% end %> <%= link_to 'New post', new_post_path %>