Envoie une notif aux followers_instructeurs le souhaitant
après chaque message déposé par l'usager
This commit is contained in:
parent
415d5c765e
commit
969478b706
7 changed files with 46 additions and 13 deletions
|
@ -19,6 +19,10 @@ class Instructeur < ApplicationRecord
|
|||
|
||||
has_one :user, dependent: :nullify
|
||||
|
||||
scope :with_instant_email_message_notifications, -> {
|
||||
includes(:assign_to).where(assign_tos: { instant_email_message_notifications_enabled: true })
|
||||
}
|
||||
|
||||
default_scope { eager_load(:user) }
|
||||
|
||||
def self.by_email(email)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue