Procedure: use after_create to build_default_mails
This commit is contained in:
parent
8995c67542
commit
a124069210
1 changed files with 1 additions and 1 deletions
|
@ -30,7 +30,7 @@ class Procedure < ActiveRecord::Base
|
|||
validates :libelle, presence: true, allow_blank: false, allow_nil: false
|
||||
validates :description, presence: true, allow_blank: false, allow_nil: false
|
||||
|
||||
after_save :build_default_mails, if: Proc.new { id_changed? }
|
||||
after_create :build_default_mails
|
||||
|
||||
def build_default_mails
|
||||
MailReceived.create(procedure: self) unless mail_received
|
||||
|
|
Loading…
Reference in a new issue