Skip to content

Commit

Permalink
votes should sort DESC I suppose :)
Browse files Browse the repository at this point in the history
  • Loading branch information
brianflanagan committed Jun 6, 2014
1 parent 971d772 commit 9d34072
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/poll.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def is_over?
end

def winning_option
self.options.to_a.sort_by { |o| o.votes.size }.first
self.options.to_a.sort_by { |o| o.votes.size }.reverse.first
end

def ends_in_hours
Expand Down

0 comments on commit 9d34072

Please sign in to comment.