修改迁移的问题

This commit is contained in:
sylor_huang@126.com
2020-03-13 16:53:03 +08:00
parent 98c5372d61
commit b9bd07541e
6 changed files with 132 additions and 120 deletions

View File

@@ -8,16 +8,16 @@ module Searchable::Dependents::User
private
def check_searchable_dependents
if firstname_previously_changed? || lastname_previously_changed? || user_extension&.school_id_previously_changed?
# reindex shixun
created_shixuns.each(&:reindex)
# reindex course
manage_courses.each(&:reindex)
# reindex subject
created_subjects.each(&:reindex)
subjects.each(&:reindex)
end
# if firstname_previously_changed? || lastname_previously_changed? || user_extension&.school_id_previously_changed?
# # reindex shixun
# created_shixuns.each(&:reindex)
#
# # reindex course
# manage_courses.each(&:reindex)
#
# # reindex subject
# created_subjects.each(&:reindex)
# subjects.each(&:reindex)
# end
end
end

View File

@@ -3,7 +3,7 @@ class User < ApplicationRecord
include Likeable
include BaseModel
include ProjectOperable
include Searchable::Dependents::User
# include Searchable::Dependents::User
# Account statuses
STATUS_ANONYMOUS = 0