Created
February 29, 2012 08:17
-
-
Save Timrael/1939102 to your computer and use it in GitHub Desktop.
Redmine WTF
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
notified << author if author && author.active? && author.notify_about?(self) | |
if assigned_to | |
if assigned_to.is_a?(Group) | |
notified += assigned_to.users.select {|u| u.active? && u.notify_about?(self)} | |
else | |
notified << assigned_to if assigned_to.active? && assigned_to.notify_about?(self) | |
end | |
end | |
#----------------- | |
#Why not this way? | |
notified << author if author | |
if assigned_to | |
notified += if assigned_to.is_a?(Group) | |
assigned_to.users | |
else | |
[assigned_to] | |
end | |
end | |
notified.select! {|u| u.active? && u.notify_about?(self)} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment