diff options
author | Matthew Landauer <matthew@openaustralia.org> | 2013-02-28 13:32:29 +1100 |
---|---|---|
committer | Matthew Landauer <matthew@openaustralia.org> | 2013-03-02 14:43:57 +1100 |
commit | 28574ebe161de15ae1fdee6745aaaa71491f6ca8 (patch) | |
tree | 56ecf25b800a58b60abd389517ae906ed61e45e6 | |
parent | 1f39f9f562d33c03bdeedbb19c5582585f242e6f (diff) |
Small refactor.
-rw-r--r-- | app/models/request_mailer.rb | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/app/models/request_mailer.rb b/app/models/request_mailer.rb index dc2c5fe21..e3f39e147 100644 --- a/app/models/request_mailer.rb +++ b/app/models/request_mailer.rb @@ -63,11 +63,7 @@ class RequestMailer < ApplicationMailer # An FOI response is outside the scope of the system, and needs admin attention def requires_admin(info_request, set_by = nil) - if !set_by.nil? - user = set_by - else - user = info_request.user - end + user = set_by || info_request.user @from = user.name_and_email @recipients = contact_from_name_and_email @subject = _("FOI response requires admin ({{reason}}) - {{title}}", :reason => info_request.described_state, :title => info_request.title) |