Browse files

Show post's comments

  • Loading branch information...
1 parent 5d8f4cd commit b467628aef2e1fe698f30a5168dc7a272b352623 @prathe committed Feb 17, 2012
Showing with 5 additions and 0 deletions.
  1. +1 −0 app/views/comments/_comment.html.erb
  2. +4 −0 app/views/posts/show.html.erb
View
1 app/views/comments/_comment.html.erb
@@ -0,0 +1 @@
+<%= content_tag :li, comment.content %>
View
4 app/views/posts/show.html.erb
@@ -10,6 +10,10 @@
<%= @post.content %>
</p>
+<ul>
+ <%= render @post.comments %>
+</ul>
+
<%= link_to 'Edit', edit_post_path(@post) %> |
<%= link_to 'Back', posts_path %>

0 comments on commit b467628

Please sign in to comment.