From 42f0d698dbbe7bf18ec858afb294dedd07fc2d0a Mon Sep 17 00:00:00 2001 From: Joachim Filip Ignacy Bartosik Date: Tue, 26 Jul 2011 17:30:54 +0200 Subject: A little cleanup in User class --- site/app/models/user.rb | 5 ++--- 1 file 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 -- cgit v1.2.3-65-gdbad