Skip to content

Commit

Permalink
convert string to int
Browse files Browse the repository at this point in the history
  • Loading branch information
johndbritton committed Feb 16, 2011
1 parent c23f666 commit 6d15775
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app.rb
Expand Up @@ -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

Expand Down

0 comments on commit 6d15775

Please sign in to comment.