Skip to content
Snippets Groups Projects
Commit 6cdf6220 authored by pabois's avatar pabois
Browse files

wip #108

parent bb33f527
No related branches found
No related tags found
No related merge requests found
......@@ -27,10 +27,10 @@
# fk_rails_... (university_id => universities.id)
#
class Communication::Website < ApplicationRecord
include WithGitRepository
include WithAbouts
include WithGit
include WithGitRepository
include WithHome
include WithAbouts
include WithImport
belongs_to :university
......
......@@ -100,7 +100,14 @@ class University::Person < ApplicationRecord
end
def identifiers(website: nil)
[:static, :author, :researcher, :teacher, :administrator]
website_id = website&.id
list = []
list << :author if communication_websites.pluck(:id).include?(website_id)
list << :researcher if research_websites.pluck(:id).include?(website_id)
list << :teacher if education_websites.pluck(:id).include?(website_id)
# TODO :administrator
list << :static unless list.empty?
list
end
def git_path_static
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment