Distinguishing between people who have likes to posts and those who have dislikes
As  you can easily identify from your code that link_to code for Like and Dislike  are same for all conditions only the class value is changed
so you can use below code it looks more clean:

&lt;% like_class = current_user.voted_up_on? @post ? 'btn-outline-primary' : 'btn-outline-dark' %&gt;
&lt;% dislike_class = current_user.voted_down_on? @post ? 'btn-outline-danger' : 'btn-outline-dark' %&gt;
&lt;%= link_to "LIKE #{@post.get_upvotes.size}", like_post_path(@post), method: :post, class: "btn #{like_class}" %&gt;
&lt;%= link_to "DISLIKE #{@post.get_downvotes.size}", dislike_post_path(@post), method: :post, class: "btn #{dislike_class}" %&gt;