don't break loops

This commit is contained in:
Yuki 2015-07-27 13:16:26 +05:30
parent c846b963a4
commit 97ad1285fe
1 changed files with 2 additions and 2 deletions

View File

@ -11,11 +11,11 @@ class QuestionWorker
user = User.find(user_id)
if rcpt == 'followers'
user.followers.each do |f|
Inbox.create!(user_id: f.id, question_id: question_id, new: true)
Inbox.create(user_id: f.id, question_id: question_id, new: true)
end
elsif rcpt.start_with? 'grp:'
user.groups.find_by_name!(rcpt.sub 'grp:', '').members.each do |m|
Inbox.create!(user_id: m.user.id, question_id: question_id, new: true)
Inbox.create(user_id: m.user.id, question_id: question_id, new: true)
end
else
logger.info "unknown rcpt #{rcpt}"