@ -13,7 +13,7 @@ module PollsHelper
end
def poll_votes_count(votes,user_ids)
votes.find_current_vote("user_id",user_ids.uniq).reject(&:blank?).size
votes.find_current_vote("user_id",user_ids.uniq).pluck(:user_id).uniq.reject(&:blank?).size
#公用tab页的相关信息
@ -14,7 +14,7 @@ if @poll_questions_count > 0
json.array! @poll_questions do |question|
json.partial! "polls/commit_answers_result", question: question,
answers:question.poll_answers,
question_votes:question.poll_votes.where(user_id:@poll_commit_ids) #问题的全部答案
question_votes: question.poll_votes.where(user_id:@poll_commit_ids) #问题的全部答案
else