Try using find_by instead of where. It will return one document instead of a Mongoid::Criteria, which is why you're getting that error (you're trying to run .update_attributes, which acts on a single record, on a group of records). Consider the following instead.
if update_vote = Vote.find_by(comment_id: @comment.id)
update_vote.update_attributes(value: 5)
redirect_to :back
else
The above code can also avoid an unnecessary call to .exists? since the existence check is right along with the definition (if .find_by does not find any records that match, it returns nil, much like .where(...).first would also do).
update_vote.update_attributesis not defined. Somewhere earlier in your code, you should defineupdate_attributes, otherwise you can't use it here.