diff --git a/app/views/posts/index.html.erb b/app/views/posts/index.html.erb index 1018f82..2f371b9 100644 --- a/app/views/posts/index.html.erb +++ b/app/views/posts/index.html.erb @@ -3,41 +3,25 @@
-
- <% @posts.each do |post| %> - -
- -
- +
- - -
- <%= button_to upvote_post_path(post), method: :post, class: "btn btn-primary btn-xs" do %> - - <% end %> - -

<%= post.votes.count %>

- - <%= button_to downvote_post_path(post), method: :delete, class: "btn btn-primary btn-xs" do %> - - <% end %> -
- -
- - <%= image_tag post.photo, class: "img-thumbnail" %> - -
- - - +
+ <%= button_to upvote_post_path(post), method: :post, class: "btn btn-primary btn-xs" do %> + + <% end %> +

<%= post.votes.count %>

+ <%= button_to downvote_post_path(post), method: :delete, class: "btn btn-primary btn-xs" do %> + + <% end %> +
+
+ <%= image_tag post.photo, class: "img-thumbnail" %> +
-

<%=link_to post.name, post.dirurl %>

+

<%= link_to post.name, post.dirurl %>

submitted <%= link_to post.created_at.to_s(:long), post %>

<%= truncate post.description, length: 400 %>

1540 comments share