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 = {