models: inverse the direction of the User role associations
This commit is contained in:
parent
d4da6502ba
commit
31bd05f835
6 changed files with 16 additions and 19 deletions
|
@ -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 })
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue