mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-27 01:43:22 +00:00
Merge pull request #7530 from Matt-Yorkley/email-after-commit
Email after commit
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user