dev said over 2 years ago on Real-time Comments and Voting :
  gonzalezarthur Why does the model name Tueet (class Tueet < ApplicationRecord) have the file name tweet.rb (# models/tweet.rb)?

Some refactoring
class VotesController < ApplicationController
  ...
  def show
    @comment = Comment.find(params[:comment_id])
    @vote = Vote.find_or_create_by(user: current_user, comment: @comment)

    @vote.voted(params[:choice])
  end

class Vote < ApplicationRecord
  ...
  def voted(choice)
    return unless choice.in?(Vote::choices.keys)

    case choice
    when 'up_vote'
      up_vote? ? cancel! : up_vote!
    when 'down_vote'
      down_vote? ? cancel! : down_vote!
    end
  end