diff --git a/app/models/communication/website.rb b/app/models/communication/website.rb index 7dcf06a8e205b47a2d3bdb55e7848e331ea30fac..ce11ea3e9e274d66f4c0dbdff85242fdd1998d0b 100644 --- a/app/models/communication/website.rb +++ b/app/models/communication/website.rb @@ -89,10 +89,6 @@ class Communication::Website < ApplicationRecord [about] end - def references - [] - end - def website self end diff --git a/app/models/communication/website/configs/base.rb b/app/models/communication/website/configs/base.rb index 1be3ddf573b2002a252d89ed0a79519d7e786bbc..2cc59f41047c557dfa03aff67084dae40f353934 100644 --- a/app/models/communication/website/configs/base.rb +++ b/app/models/communication/website/configs/base.rb @@ -47,6 +47,10 @@ class Communication::Website::Configs::Base < Communication::Website raise NotImplementedError end + ###### + # force dependencies & references to prevent multiple useless calls + ###### + def dependencies [] end diff --git a/app/models/communication/website/menu.rb b/app/models/communication/website/menu.rb index c21afe4f2234a7f73029a44efce46af603e3dee3..0f1354f3829d7ee422dcb1448b6e6ea63aa96dd4 100644 --- a/app/models/communication/website/menu.rb +++ b/app/models/communication/website/menu.rb @@ -52,14 +52,6 @@ class Communication::Website::Menu < ApplicationRecord "admin/communication/websites/menus/static" end - def dependencies - [] - end - - def references - [] - end - def translate_additional_data!(translation) items.root.ordered.each { |item| translate_menu_item!(item, translation) } end diff --git a/app/models/concerns/with_references.rb b/app/models/concerns/with_references.rb index 61c73a7288612f719e6e17833321c12200f6b84a..e876f23d27f2a69c1195ee5995ce5d7fa347c41a 100644 --- a/app/models/concerns/with_references.rb +++ b/app/models/concerns/with_references.rb @@ -2,6 +2,6 @@ module WithReferences extend ActiveSupport::Concern def references - raise NotImplementedError + [] end -end \ No newline at end of file +end diff --git a/app/models/education/diploma.rb b/app/models/education/diploma.rb index 2db78e19dd9711a64b3329f5555a967653556a0d..55fd25040b2a5540fe405f1f8aafbf7b6ea2ea3b 100644 --- a/app/models/education/diploma.rb +++ b/app/models/education/diploma.rb @@ -56,10 +56,6 @@ class Education::Diploma < ApplicationRecord blocks + programs end - def references - [] - end - def to_s "#{name}" end diff --git a/app/models/education/school.rb b/app/models/education/school.rb index b2160c3e240b44420c52ac7df63c1bf8b564ca4f..81467db462a229a5df7832c346bad8de34ca1cee 100644 --- a/app/models/education/school.rb +++ b/app/models/education/school.rb @@ -78,10 +78,6 @@ class Education::School < ApplicationRecord administrators.map(&:administrator) end - def references - [] - end - ##################### # Aboutable methods # ##################### diff --git a/app/models/research/journal.rb b/app/models/research/journal.rb index a97d40b27bf47b01f7f620b0574973f620f2d3b6..e8c5d4cd99ed4f03b20335acd154531d8c3eb9dd 100644 --- a/app/models/research/journal.rb +++ b/app/models/research/journal.rb @@ -63,10 +63,6 @@ class Research::Journal < ApplicationRecord researchers.map(&:researcher) end - def references - [] - end - ##################### # Aboutable methods # ##################### diff --git a/app/models/research/journal/paper/kind.rb b/app/models/research/journal/paper/kind.rb index 8b376f5154b7333c32faed94c8fc870d597036c3..ca2f887065fde4179dcda5a81d20d00a82813abd 100644 --- a/app/models/research/journal/paper/kind.rb +++ b/app/models/research/journal/paper/kind.rb @@ -26,16 +26,12 @@ class Research::Journal::Paper::Kind < ApplicationRecord include WithGitFiles include WithSlug include WithUniversity - + belongs_to :journal, class_name: 'Research::Journal' has_many :papers scope :ordered, -> { order(:title) } - def references - [] - end - def to_s "#{title}" end diff --git a/app/models/research/journal/volume.rb b/app/models/research/journal/volume.rb index 513f44046ef6d22fe10c4631d66471c3794f80d7..344fbafcbce448678d75c143f59cf963b36c626f 100644 --- a/app/models/research/journal/volume.rb +++ b/app/models/research/journal/volume.rb @@ -63,10 +63,6 @@ class Research::Journal::Volume < ApplicationRecord active_storage_blobs end - def references - [] - end - def path "/#{published_at&.year}-#{slug}" if published_at end diff --git a/app/models/university/organization.rb b/app/models/university/organization.rb index c5302c089af886b379cbd402c50a68fd940ea459..0ff6fddf33b60316ff8d1ff01f1f495d210591f4 100644 --- a/app/models/university/organization.rb +++ b/app/models/university/organization.rb @@ -111,10 +111,6 @@ class University::Organization < ApplicationRecord blocks end - def references - [] - end - def git_path(website) "#{git_path_content_prefix(website)}organizations/#{slug}.html" if for_website?(website) end diff --git a/app/models/university/person.rb b/app/models/university/person.rb index a249fbc17b51215982f765b60e259cd64c7d1d19..b16d5731f17b58d9e19862e3e99a9f078c79323c 100644 --- a/app/models/university/person.rb +++ b/app/models/university/person.rb @@ -201,9 +201,6 @@ class University::Person < ApplicationRecord def dependencies blocks + active_storage_blobs - # TODO: Il faut pouvoir récupérer les blobs de la personne à partir d'une facette - # person.active_storage_blobs => [<#ActiveStorage::Blob>] - # person.author.active_storage_blobs => [] end def references