|
|
@ -21,6 +21,7 @@ class PollsController < ApplicationController
|
|
|
|
# before_action :get_all_polls_commit, only: [:commit_result] #该问卷全部的用户
|
|
|
|
# before_action :get_all_polls_commit, only: [:commit_result] #该问卷全部的用户
|
|
|
|
before_action :get_left_banner_id, only:[:common_header,:start_answer,:new,:edit,:index]
|
|
|
|
before_action :get_left_banner_id, only:[:common_header,:start_answer,:new,:edit,:index]
|
|
|
|
include PollsHelper
|
|
|
|
include PollsHelper
|
|
|
|
|
|
|
|
include ActionView::Helpers::TextHelper
|
|
|
|
|
|
|
|
|
|
|
|
def index
|
|
|
|
def index
|
|
|
|
ActiveRecord::Base.transaction do
|
|
|
|
ActiveRecord::Base.transaction do
|
|
|
@ -911,7 +912,7 @@ class PollsController < ApplicationController
|
|
|
|
end
|
|
|
|
end
|
|
|
|
error_question = error_question.reject(&:blank?)
|
|
|
|
error_question = error_question.reject(&:blank?)
|
|
|
|
if error_question.reject(&:blank?).length > 0
|
|
|
|
if error_question.reject(&:blank?).length > 0
|
|
|
|
normal_status(-1, "#{error_question.join("\n").gsub(/\n/, '<br>')}")
|
|
|
|
normal_status(-1, simple_format("#{error_question.join("\n")}"))
|
|
|
|
else
|
|
|
|
else
|
|
|
|
poll_user_current = @poll.poll_users.find_by_group_ids(current_user.id).first
|
|
|
|
poll_user_current = @poll.poll_users.find_by_group_ids(current_user.id).first
|
|
|
|
poll_user_params = {
|
|
|
|
poll_user_params = {
|
|
|
|