diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 511266ba1..2c427bbea 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -3246,12 +3246,12 @@ end #获取所有子节点 def get_all_children result, jour - if jour.kind_of? JournalsForMessage + if jour.kind_of? Message jour.children.includes(:author, :praise_tread_cache).each do |jour_child| result << jour_child get_all_children result, jour_child end - elsif (jour.kind_of? Message) || (jour.kind_of? BlogComment) || (jour.kind_of? OrgDocumentComment) + elsif (jour.kind_of? JournalsForMessage) || (jour.kind_of? BlogComment) || (jour.kind_of? OrgDocumentComment) jour.children.each do |jour_child| result << jour_child get_all_children result, jour_child