aboutsummaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorJoachim Filip Ignacy Bartosik <jbartosik@gmail.com>2010-07-20 13:14:24 +0200
committerJoachim Filip Ignacy Bartosik <jbartosik@gmail.com>2010-07-27 23:02:44 +0200
commit7660505cf0850800b27f52db5b0bb6d4df77e954 (patch)
treeedbc9b0d65eb918511826191ec524c634cc49d7e /app
parentBugfix: Questions created by administrators were not approved. (diff)
downloadrecruiting-webapp-7660505cf0850800b27f52db5b0bb6d4df77e954.tar.gz
recruiting-webapp-7660505cf0850800b27f52db5b0bb6d4df77e954.tar.bz2
recruiting-webapp-7660505cf0850800b27f52db5b0bb6d4df77e954.zip
Rewrote UserMailer#question_title
Diffstat (limited to 'app')
-rw-r--r--app/models/user_mailer.rb6
1 files changed, 1 insertions, 5 deletions
diff --git a/app/models/user_mailer.rb b/app/models/user_mailer.rb
index 364b030..7379e5d 100644
--- a/app/models/user_mailer.rb
+++ b/app/models/user_mailer.rb
@@ -7,11 +7,7 @@ class UserMailer < ActionMailer::Base
end
def question_title(answer)
- if answer.question.nil?
- "none"
- else
- answer.question.title
- end
+ answer.question.try.title || "none"
end
def forgot_password(user, key)