Ruby on Rails

Views

<h1>Listing posts</h1>


<% for post in @posts %>
  <h2><%=h post.title %></h2>
  <p><%=h post.body %></p>
  <p><%= link_to 'Show', post %> <%= link_to 'Edit', edit_post_path(post) %>
  <%= link_to 'Destroy', post, :confirm => 'Are you sure?', :method => :delete %></p>
<% end %>

<br/>

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

José M. Vidal .

10 of 16