forked from Trustie/forgeplus
fixed 小程序活动报名信息
This commit is contained in:
parent
a4df928c5a
commit
dbc1ea107c
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue