adds notifications for proposals
This commit is contained in:
@@ -11,6 +11,7 @@ class ProposalNotificationsController < ApplicationController
|
||||
@proposal = Proposal.find(notification_params[:proposal_id])
|
||||
if @notification.save
|
||||
@proposal.voters.each do |voter|
|
||||
Notification.add(voter.id, @notification)
|
||||
if voter.email_on_proposal_notification?
|
||||
Mailer.proposal_notification(@notification, voter).deliver_later
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user