From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1Qntdw-0002zq-Rv for garchives@archives.gentoo.org; Mon, 01 Aug 2011 14:38:57 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 87E1221C16A; Mon, 1 Aug 2011 14:38:18 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 4724821C16A for ; Mon, 1 Aug 2011 14:38:18 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id B6EC82AC00C for ; Mon, 1 Aug 2011 14:38:17 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id 5FFEE45EF9 for ; Mon, 1 Aug 2011 14:38:16 +0000 (UTC) From: "Petteri Räty" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Petteri Räty" Message-ID: <42f0d698dbbe7bf18ec858afb294dedd07fc2d0a.betelgeuse@gentoo> Subject: [gentoo-commits] proj/council-webapp:master commit in: site/app/models/ X-VCS-Repository: proj/council-webapp X-VCS-Files: site/app/models/user.rb X-VCS-Directories: site/app/models/ X-VCS-Committer: betelgeuse X-VCS-Committer-Name: Petteri Räty X-VCS-Revision: 42f0d698dbbe7bf18ec858afb294dedd07fc2d0a Date: Mon, 1 Aug 2011 14:38:16 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: X-Archives-Hash: 5cdb7bbb7c178d5c987c748f8af70541 commit: 42f0d698dbbe7bf18ec858afb294dedd07fc2d0a Author: Joachim Filip Ignacy Bartosik gmail com= > AuthorDate: Tue Jul 26 15:30:54 2011 +0000 Commit: Petteri R=C3=A4ty gentoo org> CommitDate: Tue Jul 26 15:30:54 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/council-webap= p.git;a=3Dcommit;h=3D42f0d698 A little cleanup in User class --- 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.ze= ro? =20 for agenda in agendas - if Participation.participant_is(self).agenda_is(agenda).count =3D=3D= 0 + if Participation.participant_is(self).agenda_is(agenda).count.zero= ? num_status +=3D 1 if num_status < 3 else num_status =3D 0 if num_status =3D=3D 1 end end =20 - text_statuses =3D ['Was on last meeting', 'Skipped last meeting', - 'Slacker', 'No more a council'] + text_statuses =3D ['Was on last meeting', 'Skipped last meeting', 'S= lacker', 'No more a council'] text_statuses[num_status] end =20