Basic Challenge: Dislike Links

Add a dislike button to your application similar to the like button.

We'll cover the following

Problem statement

You currently only have a ‘like’ button displaying in our index view. Your task is to add a similar button for ‘dislike’.

You have to do the following:

  1. Create a dislike action in links_controller.rb
  2. Configure the route for the dislike action
  3. Configure the index view to display a ‘dislike’ button similar to a like button

Refer to the lesson on Acts as Votable for what methods to use for creating your dislike action.

Note: Displaying the dislike count is optional. You can make a call to get_downvotes.size on a link to get the count of dislikes.

Get hands-on with 1400+ tech skills courses.