Sha256: a7bab5bda63dfc7d43ffba1db3ebee305e97a706fa9aff902e3b1b0bcdf5d509

Contents?: true

Size: 703 Bytes

Versions: 3

Compression:

Stored size: 703 Bytes

Contents

<h1>Listing posts</h1>

<table>
  <thead>
    <tr>
      <th>Image</th>
      <th>Title</th>
      <th>Body</th>
      <th></th>
      <th></th>
      <th></th>
    </tr>
  </thead>

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

        <td><%= image_tag post.image.file.regular, width: 50, height: 50 if post.image? %></td>
        <td><%= post.title %></td>
        <td><%= post.body %></td>
        <td><%= link_to 'Show', post %></td>
        <td><%= link_to 'Edit', edit_post_path(post) %></td>
        <td><%= link_to 'Destroy', post, method: :delete, data: { confirm: 'Are you sure?' } %></td>
      </tr>
    <% end %>
  </tbody>
</table>

<br>

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

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
uploadbox-0.0.3 test/dummy/app/views/posts/index.html.erb
uploadbox-0.0.2 test/dummy/app/views/posts/index.html.erb
uploadbox-0.0.1 test/dummy/app/views/posts/index.html.erb