Project Challenge: Display Comments

Modify views to display user comments.

Problem statement

In this challenge, you simply have to display all the comments for a particular link on its show view. You must also display the email attribute of the user who submitted the comment.

A comment will look like this: Commented: commenting is fun
  • and the body of the comment, commenting is fun, are retrieved from the database.
  • Commented: is simple HTML text.

Important concepts

  1. We store the content of a comment in comment.body
  2. Each comment is associated with a link. You must keep this association in mind to access the comments for a particular link.
  3. You will not be passing a @comment instance variable. Instead, you will be passing @link as your instance variable.


Get hands-on with 1200+ tech skills courses.