a comment vote is not a vote for the story

This commit is contained in:
joshua stein 2012-07-04 09:11:55 -05:00
parent b5fc3d2e1f
commit e177b769fc

View file

@ -88,7 +88,8 @@ class StoriesController < ApplicationController
@comment = Comment.new
if @user
if v = Vote.find_by_user_id_and_story_id(@user.id, @story.id)
if v = Vote.find_by_user_id_and_story_id_and_comment_id(@user.id,
@story.id, nil)
@story.vote = v.vote
end