diff options
Diffstat (limited to 'guides/code/getting_started/app')
-rw-r--r-- | guides/code/getting_started/app/views/posts/show.html.erb | 12 |
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| %> |