Advertisement
Guest User

Untitled

a guest
Jun 18th, 2019
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. class NotificationsJob
  2. include SuckerPunch::Job
  3.  
  4. def perform(notification_params)
  5. recipients = notification_params[:recipients]
  6. content = notification_params[:content]
  7.  
  8. recipients.each do |recipient|
  9. mailer_params = { recipient: recipient,
  10. content: content }
  11. NotificationsMailer.with(mailer_params).notify.deliver_now
  12. end
  13. end
  14. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement