Do not fail upon missing users in Message#recipients.
This commit is contained in:
parent
b07e855235
commit
af8a035994
1 changed files with 2 additions and 2 deletions
|
@ -68,9 +68,9 @@ class Message < ActiveRecord::Base
|
|||
end
|
||||
|
||||
def recipients
|
||||
User.find(recipients_ids)
|
||||
User.where(id: recipients_ids)
|
||||
end
|
||||
|
||||
|
||||
def deliver
|
||||
for user in recipients
|
||||
if user.receive_email?
|
||||
|
|
Loading…
Reference in a new issue