aboutsummaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorJoachim Filip Ignacy Bartosik <jbartosik@gmail.com>2010-07-19 13:39:01 +0200
committerJoachim Filip Ignacy Bartosik <jbartosik@gmail.com>2010-07-27 23:02:43 +0200
commitdca36097c60520d5a5bb59a3033f9a728a21b5bb (patch)
treec1dd0e3e2d7672ca7c4ea59279d42b4b3abf1fa3 /app
parentReplace complicated logical expressions in models with return-ifs (diff)
downloadrecruiting-webapp-dca36097c60520d5a5bb59a3033f9a728a21b5bb.tar.gz
recruiting-webapp-dca36097c60520d5a5bb59a3033f9a728a21b5bb.tar.bz2
recruiting-webapp-dca36097c60520d5a5bb59a3033f9a728a21b5bb.zip
Rename method in User model
answered_all_multi_choice -> answered_all_multi_choice_questions?
Diffstat (limited to 'app')
-rw-r--r--app/models/user.rb2
-rw-r--r--app/views/taglibs/pages.dryml2
2 files changed, 2 insertions, 2 deletions
diff --git a/app/models/user.rb b/app/models/user.rb
index 7fc1bc1..26732fc 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -128,7 +128,7 @@ class User < ActiveRecord::Base
end
end
- def answered_all_multi_choice
+ def answered_all_multi_choice_questions?
Question.multiple_choice.ungrouped_questions_of_user(id).unanswered(id).count == 0 &&
Question.multiple_choice.grouped_questions_of_user(id).unanswered(id).count == 0
end
diff --git a/app/views/taglibs/pages.dryml b/app/views/taglibs/pages.dryml
index 6499350..4ed22bc 100644
--- a/app/views/taglibs/pages.dryml
+++ b/app/views/taglibs/pages.dryml
@@ -45,7 +45,7 @@
<if test="&current_user.try.role.try.is_mentor? && User.mentorless_recruits.count > 0">
<a with="&User" action="mentorless_recruits">See mentorless recruits</a><br/>
</if>
- <if test="&current_user.answered_all_multi_choice">
+ <if test="&current_user.answered_all_multi_choice_questions?">
<if test="&Answer.wrong_answers_of(current_user.try.id).count > 0">
You answered all multiple choice questions, but some of them wrong.<br/>
</if>