1 |
commit: 42f0d698dbbe7bf18ec858afb294dedd07fc2d0a |
2 |
Author: Joachim Filip Ignacy Bartosik <jbartosik <AT> gmail <DOT> com> |
3 |
AuthorDate: Tue Jul 26 15:30:54 2011 +0000 |
4 |
Commit: Petteri Räty <betelgeuse <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Jul 26 15:30:54 2011 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/council-webapp.git;a=commit;h=42f0d698 |
7 |
|
8 |
A little cleanup in User class |
9 |
|
10 |
--- |
11 |
site/app/models/user.rb | 5 ++--- |
12 |
1 files changed, 2 insertions(+), 3 deletions(-) |
13 |
|
14 |
diff --git a/site/app/models/user.rb b/site/app/models/user.rb |
15 |
index bba0a6e..28195f3 100644 |
16 |
--- a/site/app/models/user.rb |
17 |
+++ b/site/app/models/user.rb |
18 |
@@ -62,15 +62,14 @@ class User < ActiveRecord::Base |
19 |
return 'There were no meetings in this term yet' if agendas.count.zero? |
20 |
|
21 |
for agenda in agendas |
22 |
- if Participation.participant_is(self).agenda_is(agenda).count == 0 |
23 |
+ if Participation.participant_is(self).agenda_is(agenda).count.zero? |
24 |
num_status += 1 if num_status < 3 |
25 |
else |
26 |
num_status = 0 if num_status == 1 |
27 |
end |
28 |
end |
29 |
|
30 |
- text_statuses = ['Was on last meeting', 'Skipped last meeting', |
31 |
- 'Slacker', 'No more a council'] |
32 |
+ text_statuses = ['Was on last meeting', 'Skipped last meeting', 'Slacker', 'No more a council'] |
33 |
text_statuses[num_status] |
34 |
end |