models: inverse the direction of the User role associations

This commit is contained in:
Pierre de La Morinerie 2022-03-15 16:28:22 +00:00
parent d4da6502ba
commit 31bd05f835
6 changed files with 16 additions and 19 deletions

View file

@ -31,7 +31,7 @@ class Instructeur < ApplicationRecord
has_many :archives
has_many :bulk_messages, dependent: :destroy
has_one :user, dependent: :nullify
belongs_to :user
scope :with_instant_email_message_notifications, -> {
includes(:assign_to).where(assign_tos: { instant_email_message_notifications_enabled: true })