diff --git a/app/models/communication/website/permalink/organization/category.rb b/app/models/communication/website/permalink/organization/category.rb index a1d1b96e4a2e54fba17e581239ec6a76406e6879..ef5fb6ec24e56acda322ab5f8f11b9b586191c83 100644 --- a/app/models/communication/website/permalink/organization/category.rb +++ b/app/models/communication/website/permalink/organization/category.rb @@ -18,10 +18,6 @@ class Communication::Website::Permalink::Organization::Category < Communication: protected - def published? - website.id == about.communication_website_id - end - def substitutions { slug: about.slug diff --git a/app/models/communication/website/permalink/person/category.rb b/app/models/communication/website/permalink/person/category.rb index 0bfe1edf573bd9ca97d782265bf486cb284efe7c..7b4b2ef0ec30ef1b35a7a31f8129e9cf5d116f4b 100644 --- a/app/models/communication/website/permalink/person/category.rb +++ b/app/models/communication/website/permalink/person/category.rb @@ -18,10 +18,6 @@ class Communication::Website::Permalink::Person::Category < Communication::Websi protected - def published? - website.id == about.communication_website_id - end - def substitutions { slug: about.slug diff --git a/app/models/university/organization/category.rb b/app/models/university/organization/category.rb index 3bbc8b2aa40ade101b24ec9f1c4759ad46eb8b82..cdfdf33c4b716f196ab1b273b99e7e1f3267e500 100644 --- a/app/models/university/organization/category.rb +++ b/app/models/university/organization/category.rb @@ -29,6 +29,7 @@ class University::Organization::Category < ApplicationRecord include Permalinkable include Sluggable include Translatable + include WithGitFiles include WithUniversity has_and_belongs_to_many :organizations, @@ -39,6 +40,14 @@ class University::Organization::Category < ApplicationRecord scope :ordered, -> { order(:name) } + def git_path(website) + git_path_content_prefix(website) + git_path_relative + end + + def git_path_relative + "organizations_categories/#{slug}/_index.html" + end + def to_s "#{name}" end diff --git a/app/models/university/person/category.rb b/app/models/university/person/category.rb index 685acaaa71150ffbdfe16c802fc8fb0116a21781..661cd7d52979bc6099bffb699ec82d12acaafd03 100644 --- a/app/models/university/person/category.rb +++ b/app/models/university/person/category.rb @@ -29,6 +29,7 @@ class University::Person::Category < ApplicationRecord include Permalinkable include Sluggable include Translatable + include WithGitFiles include WithUniversity has_and_belongs_to_many :people, @@ -39,6 +40,14 @@ class University::Person::Category < ApplicationRecord scope :ordered, -> { order(:name) } + def git_path(website) + git_path_content_prefix(website) + git_path_relative + end + + def git_path_relative + "persons_categories/#{slug}/_index.html" + end + def to_s "#{name}" end