问卷的简答题回答bug修复

problem_set
SylorHuang 6 years ago
parent 266fcfc4c7
commit afb3181f88

@ -91,15 +91,17 @@ class PollVotesController < ApplicationController
end end
else #主观题的输入 else #主观题的输入
# current_vote_text = user_votes.find_vote_text # current_vote_text = user_votes.find_vote_text
if user_votes.present? if question_answer_text.present?
user_votes.first.update_attribute("vote_text", question_answer_text) if user_votes.present?
# if question_answer_text.present? user_votes.first.update_attribute("vote_text", question_answer_text)
# user_votes.first.update_attribute("vote_text", question_answer_text) # if question_answer_text.present?
# else # user_votes.first.update_attribute("vote_text", question_answer_text)
# user_votes.destroy_all # else
# end # user_votes.destroy_all
else # end
PollVote.create(vote_answer_params) else
PollVote.create(vote_answer_params)
end
end end
end end
@current_question_number = @poll_question.question_number @current_question_number = @poll_question.question_number

Loading…
Cancel
Save