From 6d15775d9b8fec373b7e0a5d365a38504f2bdfd2 Mon Sep 17 00:00:00 2001 From: John Britton Date: Wed, 16 Feb 2011 02:38:36 -0500 Subject: [PATCH] convert string to int --- app.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app.rb b/app.rb index cd76075..84880a9 100644 --- a/app.rb +++ b/app.rb @@ -20,7 +20,7 @@ class Competitor def self.nth_place(n) ranked_competitors = all.sort {|a,b| -1*a.votes.count <=> b.votes.count} - return ranked_competitors[n-1] + return ranked_competitors[n.to_i-1] end end