Skip to content
Snippets Groups Projects
Commit 387c6956 authored by pabois's avatar pabois
Browse files

add authors to post save

parent 7b43c44c
No related branches found
No related tags found
No related merge requests found
......@@ -73,7 +73,7 @@ class Communication::Website::Post < ApplicationRecord
end
def git_dependencies(website)
[self] + [author] + categories + active_storage_blobs
[self] + [author, author&.author] + categories + active_storage_blobs
end
def git_destroy_dependencies(website)
......
......@@ -42,7 +42,9 @@ module Communication::Website::WithAbouts
def people
@people ||= (
posts.collect(&:author) +
programs.collect(&:university_people_through_teachers).flatten
posts.collect(&:author).map(&:author) +
programs.collect(&:university_people_through_teachers).flatten +
programs.collect(&:university_people_through_teachers).flatten.map(&:teacher)
# TODO researchers via articles
).uniq.compact
end
......
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