Fix race condition on emailing for new proposition #51

Merged
ignisf merged 1 commits from fix-proposition-email into master 2024-09-22 23:02:27 +03:00
1 changed files with 1 additions and 1 deletions

View File

@ -4,7 +4,7 @@ class Proposition < ActiveRecord::Base
enum status: [:undecided, :approved, :rejected, :backup] enum status: [:undecided, :approved, :rejected, :backup]
delegate :proposable_title, :proposable_type, :proposable_description, to: :proposable delegate :proposable_title, :proposable_type, :proposable_description, to: :proposable
after_create :send_creation_notification after_commit :send_creation_notification, on: [:create]
before_destroy :send_withdrawal_notification before_destroy :send_withdrawal_notification
def confirm! def confirm!