Merge pull request #7530 from Matt-Yorkley/email-after-commit

Email after commit
This commit is contained in:
Matt-Yorkley
2021-05-12 21:22:55 +02:00
committed by GitHub
2 changed files with 2 additions and 2 deletions

View File

@@ -105,7 +105,7 @@ class Enterprise < ApplicationRecord
after_touch :touch_distributors
after_create :set_default_contact
after_create :relate_to_owners_enterprises
after_create :send_welcome_email
after_create_commit :send_welcome_email
after_rollback :restore_permalink

View File

@@ -51,7 +51,7 @@ describe Sets::ModelSet do
attributes = { collection_attributes: { '1' => { name: 'deleteme' } } }
ms = Sets::ModelSet.new(Enterprise, Enterprise.all, attributes, nil,
proc { |attrs| attrs['name'] == 'deleteme' })
proc { |attrs| attrs[:name] == 'deleteme' })
expect { ms.save }.to change(Enterprise, :count).by(0)
end