Using unless instead of 'if !'
This commit is contained in:
parent
1a0c9f5983
commit
0fae1137fa
1 changed files with 1 additions and 1 deletions
|
|
@ -11,7 +11,7 @@ class ReportMailer < ActionMailer::Base
|
||||||
}
|
}
|
||||||
Role.admins.each do |role|
|
Role.admins.each do |role|
|
||||||
user = User.find_by_id(role.person_id)
|
user = User.find_by_id(role.person_id)
|
||||||
if !user.user_preferences.exists?(:email_type => :someone_reported)
|
unless user.user_preferences.exists?(:email_type => :someone_reported)
|
||||||
resource[:email] = user.email
|
resource[:email] = user.email
|
||||||
format(resource).deliver
|
format(resource).deliver
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue