Add sdg manager section to admin

Allow a user to become an sdg manager
This commit is contained in:
taitus
2020-11-25 18:57:19 +01:00
committed by Javi Martín
parent fb5965fe63
commit 9fe24aec9d
24 changed files with 301 additions and 0 deletions

View File

@@ -95,6 +95,7 @@ class User < ApplicationRecord
scope :administrators, -> { joins(:administrator) }
scope :moderators, -> { joins(:moderator) }
scope :organizations, -> { joins(:organization) }
scope :sdg_managers, -> { joins(:sdg_manager) }
scope :officials, -> { where("official_level > 0") }
scope :male, -> { where(gender: "male") }
scope :female, -> { where(gender: "female") }