Guest User

Untitled

a guest
Oct 18th, 2017
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  1. def enqueue(job)
  2. if doc.cached_recipients.empty? && !recipients.empty?
  3. recipients.each do |person|
  4. doc.cached_recipients.build(:recipient_class => person.class.to_s,:recipient_id => person.id, :email => person.email)
  5. end
  6. doc.save
  7. end
  8. end
Add Comment
Please, Sign In to add comment