From 1734ce22670a0087befebe506aeaa4bcaf074c16 Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Sat, 11 Jan 2020 14:57:03 +0800 Subject: [PATCH] =?UTF-8?q?=E9=97=AE=E5=8D=B7=E9=80=89=E6=8B=A9=E5=85=B6?= =?UTF-8?q?=E4=BB=96=E9=80=89=E9=A1=B9=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/poll_votes_controller.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/controllers/poll_votes_controller.rb b/app/controllers/poll_votes_controller.rb index 17223a955..6dd62153d 100644 --- a/app/controllers/poll_votes_controller.rb +++ b/app/controllers/poll_votes_controller.rb @@ -57,6 +57,8 @@ class PollVotesController < ApplicationController :vote_text => question_answer_text } PollVote.create(answer_option) + # 重新取一次poll_votes + user_votes = @poll_question.poll_votes.find_current_vote("user_id",current_user.id) end # if current_vote_text.present? #已有其他输入文字的选项 # current_vote_text.update_attribute("vote_text", question_answer_text)