Advertisement
Guest User

Untitled

a guest
Apr 28th, 2016
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. def fetch_watcher_user_ids
  2. (self.watcher_user_ids || []) | (AtribuicaoAutomatica.find_by_issue(self)
  3. .where(redistribute: :watcher)
  4. .map(&:group)
  5. .map(&:users)
  6. .map{|us| us.select{|u| u.active?}}
  7. .map { |us| us.map(&:id) }.inject(&:concat) || [])
  8. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement