diff --git a/app/models/communication/website.rb b/app/models/communication/website.rb index ce11ea3e9e274d66f4c0dbdff85242fdd1998d0b..3ccacb583d7d21742faf95b697dc379cac25affd 100644 --- a/app/models/communication/website.rb +++ b/app/models/communication/website.rb @@ -37,6 +37,7 @@ class Communication::Website < ApplicationRecord self.filter_attributes += [:access_token] include WithAbouts + include WithAssociatedObjects include WithConfigs include WithConnectedObjects include WithDependencies @@ -44,7 +45,6 @@ class Communication::Website < ApplicationRecord include WithGitRepository include WithImport include WithLanguages - include WithOldDependencies include WithProgramCategories include WithReferences include WithSpecialPages diff --git a/app/models/communication/website/page/person.rb b/app/models/communication/website/page/person.rb index 6a16e8d1b6dc8bbafa3524614773925336957573..62f3b33709b7b5d7ad8737a3f565849e608116bf 100644 --- a/app/models/communication/website/page/person.rb +++ b/app/models/communication/website/page/person.rb @@ -47,7 +47,7 @@ class Communication::Website::Page::Person < Communication::Website::Page def dependencies super + [website.config_default_languages] + - explicitly_connected_people + website.connected_people end def explicitly_connected_people diff --git a/app/models/communication/website/with_old_dependencies.rb b/app/models/communication/website/with_associated_objects.rb similarity index 91% rename from app/models/communication/website/with_old_dependencies.rb rename to app/models/communication/website/with_associated_objects.rb index 0498e80c65a23c3f1a9d215e552a8cb134ee8120..671c99d1f47a2f841f79bd2e2864fb0de7fd30d7 100644 --- a/app/models/communication/website/with_old_dependencies.rb +++ b/app/models/communication/website/with_associated_objects.rb @@ -1,4 +1,4 @@ -module Communication::Website::WithOldDependencies +module Communication::Website::WithAssociatedObjects extend ActiveSupport::Concern included do @@ -52,16 +52,6 @@ module Communication::Website::WithOldDependencies has_teachers? ? about.teachers : University::Person.none end - def people - connected_persons - end - - def organizations - connected_organizations - end - - # Deprecated, needs refactor for performance - def has_communication_posts? posts.published.any? end