/app/views/posts/index.html.erb
http://scruptious-social-networking.googlecode.com/ · Ruby HTML · 22 lines · 18 code · 4 blank · 0 comment · 1 complexity · 8b2d6e60f5898fec910b115697f90978 MD5 · raw file
- <h1>Listing blogs</h1>
- <table>
- <tr>
- <th>Title</th>
- <th>Body</th>
- </tr>
- <% for post in @posts %>
- <tr>
- <td><%=h post.title %></td>
- <td><%=h post.body %></td>
- <td><%= link_to 'Show', post %></td>
- <td><%= link_to 'Edit', edit_post_path(post) %></td>
- <td><%= link_to 'Destroy', post, :confirm => 'Are you sure?', :method => :delete %></td>
- </tr>
- <% end %>
- </table>
- <br />
- <%= link_to 'New blog', new_post_path %>