use after_create instead of after_save
This commit is contained in:
parent
d23b1136ad
commit
4fc038fe1b
2 changed files with 2 additions and 2 deletions
|
@ -19,7 +19,7 @@ class Invite < ApplicationRecord
|
|||
|
||||
before_validation -> { sanitize_email(:email) }
|
||||
|
||||
after_save_commit :send_notification
|
||||
after_create_commit :send_notification
|
||||
|
||||
validates :email, presence: true
|
||||
validates :email, uniqueness: { scope: :dossier_id }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue