From 3b4e1e1516c520f0bc72cd3f88a9d01aaf5e6c8c Mon Sep 17 00:00:00 2001 From: SylorHuang Date: Sat, 27 Jul 2019 12:57:35 +0800 Subject: [PATCH] fixbug --- app/controllers/polls_controller.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/controllers/polls_controller.rb b/app/controllers/polls_controller.rb index fcdf4f4d7..b90b3c230 100644 --- a/app/controllers/polls_controller.rb +++ b/app/controllers/polls_controller.rb @@ -21,6 +21,7 @@ class PollsController < ApplicationController # before_action :get_all_polls_commit, only: [:commit_result] #该问卷全部的用户 before_action :get_left_banner_id, only:[:common_header,:start_answer,:new,:edit,:index] include PollsHelper + include ActionView::Helpers::TextHelper def index ActiveRecord::Base.transaction do @@ -911,7 +912,7 @@ class PollsController < ApplicationController end error_question = error_question.reject(&:blank?) if error_question.reject(&:blank?).length > 0 - normal_status(-1, "#{error_question.join("\n").gsub(/\n/, '
')}") + normal_status(-1, simple_format("#{error_question.join("\n")}")) else poll_user_current = @poll.poll_users.find_by_group_ids(current_user.id).first poll_user_params = {