Skip to content
Snippets Groups Projects
Unverified Commit b9f3b1ad authored by Sébastien Gaya's avatar Sébastien Gaya
Browse files

fix #116

parent da55e4d7
No related branches found
No related tags found
No related merge requests found
......@@ -62,6 +62,11 @@ class University::Person < ApplicationRecord
foreign_key: :author_id,
dependent: :nullify
has_many :communication_website_imported_authors,
class_name: "Communiation::Website::Imported::Author",
foreign_key: :author_id,
dependent: :destroy
has_many :author_websites,
-> { distinct },
through: :communication_website_posts,
......@@ -77,6 +82,7 @@ class University::Person < ApplicationRecord
through: :education_programs,
source: :websites
validates_presence_of :first_name, :last_name
validates_uniqueness_of :email,
scope: :university_id,
......
......@@ -17,7 +17,7 @@ teachers:
teachers_description:
<% @program.teachers.includes(:person).ordered.each do |teacher| %>
"<%= teacher.person.slug %>": >
<%= teacher.description %>
<%= teacher.description.blank? ? teacher.person.biography.to_plain_text : teacher.description %>
<% end %>
roles:
<% @program.roles.ordered.each do |role| %>
......
......@@ -18,6 +18,6 @@ administrators:
administrators_description:
<% @school.administrators.includes(:person).ordered.each do |administrator| %>
"<%= administrator.person.slug %>": >
<%= administrator.description %>
<%= administrator.description.blank? ? administrator.person.biography.to_plain_text : administrator.description %>
<% 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