aboutsummaryrefslogtreecommitdiffstats
path: root/guides/code
diff options
context:
space:
mode:
Diffstat (limited to 'guides/code')
-rw-r--r--guides/code/getting_started/app/views/posts/show.html.erb12
1 files changed, 12 insertions, 0 deletions
diff --git a/guides/code/getting_started/app/views/posts/show.html.erb b/guides/code/getting_started/app/views/posts/show.html.erb
index 0580879c1a..7066c85065 100644
--- a/guides/code/getting_started/app/views/posts/show.html.erb
+++ b/guides/code/getting_started/app/views/posts/show.html.erb
@@ -8,6 +8,18 @@
<%= @post.text %>
</p>
+<h2>Comments</h2>
+<% @post.comments.each do |comment| %>
+ <p>
+ <strong>Commenter:</strong>
+ <%= comment.commenter %>
+ </p>
+
+ <p>
+ <strong>Comment:</strong>
+ <%= comment.body %>
+ </p>
+<% end %>
<h2>Add a comment:</h2>
<%= form_for([@post, @post.comments.build]) do |f| %>