Skip to content
Snippets Groups Projects
Commit 9f1a54ff authored by pabois's avatar pabois
Browse files

adjust

parent 6ed70da4
No related branches found
No related tags found
No related merge requests found
......@@ -137,12 +137,12 @@ class University::Person < ApplicationRecord
before_validation :sanitize_email, :prepare_name
scope :ordered, -> { order(:last_name, :first_name) }
scope :administration, -> { where(is_administration: true) }
scope :teachers, -> { where(is_teacher: true) }
scope :researchers, -> { where(is_researcher: true) }
scope :alumni, -> { where(is_alumnus: true) }
scope :accredited, -> { where(habilitation: true) }
scope :ordered, -> { order(:last_name, :first_name) }
scope :administration, -> { where(is_administration: true) }
scope :teachers, -> { where(is_teacher: true) }
scope :researchers, -> { where(is_researcher: true) }
scope :alumni, -> { where(is_alumnus: true) }
scope :with_habilitation, -> { where(habilitation: true) }
scope :for_role, -> (role) { where("is_#{role}": true) }
scope :for_category, -> (category_id) { includes(:categories).where(categories: { id: category_id })}
scope :for_program, -> (program_id) {
......
......@@ -23,7 +23,7 @@
</div>
</div>
<%= render 'admin/application/favorites/show' if current_user.favorites.any? %>
<%= render 'admin/application/favorites/show' %>
<div class="row mt-5 pt-5">
<% @namespaces.each do |namespace| %>
......
......@@ -21,7 +21,7 @@
<%= f.association :director,
collection: current_university.people
.for_language_id(current_university.default_language_id)
.accredited
.with_habilitation
.ordered %>
</div>
</div>
......
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