From dbc1ea107cbde2589f3e94c1e73ac93fb29fae5f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Cxxq250=E2=80=9D?= <“xxq250@qq.com”> Date: Fri, 4 Nov 2022 14:37:52 +0800 Subject: [PATCH] =?UTF-8?q?fixed=20=E5=B0=8F=E7=A8=8B=E5=BA=8F=E6=B4=BB?= =?UTF-8?q?=E5=8A=A8=E6=8A=A5=E5=90=8D=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/platform_communicate.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/models/platform_communicate.rb b/app/models/platform_communicate.rb index a8673756..8ce7512a 100644 --- a/app/models/platform_communicate.rb +++ b/app/models/platform_communicate.rb @@ -21,11 +21,11 @@ class PlatformCommunicate < ApplicationRecord has_many :watchers, as: :watchable, dependent: :destroy def watched_ext_info(user_id) - ext_info = self.watchers.find_by(user_id: user_id) - return [] if ext_info.blank? + watcher = self.watchers.find_by(user_id: user_id) + return [] if watcher.blank? str = [] self.enroll_field.to_s.split(",").each_with_index do |m, index| - str.push("#{ext_info["ext#{index + 1}"]}") + str.push("#{watcher.ext_info["ext#{index + 1}"]}") end str end