Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fix for :up / :down points are nil

  • Loading branch information...
commit 9584f9f2e193cef5daec42574becc3ea636c35bb 1 parent 69a0b2e
Alex Tuộc authored May 01, 2011

Showing 1 changed file with 1 addition and 1 deletion. Show diff stats Hide diff stats

  1. 2  lib/voteable_mongoid/voteable/tasks.rb
2  lib/voteable_mongoid/voteable/tasks.rb
@@ -94,7 +94,7 @@ def self.remake_stats_for(doc, voteable)
94 94
           'votes.up_count' => up_count,
95 95
           'votes.down_count' => down_count,
96 96
           'votes.count' => up_count + down_count,
97  
-          'votes.point' => voteable[:up]*up_count + voteable[:down]*down_count
  97
+          'votes.point' => voteable[:up].to_i*up_count + voteable[:down].to_i*down_count
98 98
         )
99 99
       end
100 100
 

0 notes on commit 9584f9f

Please sign in to comment.
Something went wrong with that request. Please try again.