diff options
author | Joachim Filip Ignacy Bartosik <jbartosik@gmail.com> | 2011-07-26 17:30:54 +0200 |
---|---|---|
committer | Joachim Filip Ignacy Bartosik <jbartosik@gmail.com> | 2011-07-26 17:30:54 +0200 |
commit | 42f0d698dbbe7bf18ec858afb294dedd07fc2d0a (patch) | |
tree | c69ec959a210f2a9ed479e61433e74288cdd1f55 | |
parent | Use hobo scopes where possible (diff) | |
download | council-webapp-42f0d698dbbe7bf18ec858afb294dedd07fc2d0a.tar.gz council-webapp-42f0d698dbbe7bf18ec858afb294dedd07fc2d0a.tar.bz2 council-webapp-42f0d698dbbe7bf18ec858afb294dedd07fc2d0a.zip |
A little cleanup in User class
-rw-r--r-- | site/app/models/user.rb | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/site/app/models/user.rb b/site/app/models/user.rb index bba0a6e..28195f3 100644 --- a/site/app/models/user.rb +++ b/site/app/models/user.rb @@ -62,15 +62,14 @@ class User < ActiveRecord::Base return 'There were no meetings in this term yet' if agendas.count.zero? for agenda in agendas - if Participation.participant_is(self).agenda_is(agenda).count == 0 + if Participation.participant_is(self).agenda_is(agenda).count.zero? num_status += 1 if num_status < 3 else num_status = 0 if num_status == 1 end end - text_statuses = ['Was on last meeting', 'Skipped last meeting', - 'Slacker', 'No more a council'] + text_statuses = ['Was on last meeting', 'Skipped last meeting', 'Slacker', 'No more a council'] text_statuses[num_status] end |