Permalink
Browse files

Fix for :up / :down points are nil

  • Loading branch information...
1 parent 69a0b2e commit 9584f9f2e193cef5daec42574becc3ea636c35bb @tiendung tiendung committed May 1, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/voteable_mongoid/voteable/tasks.rb
@@ -94,7 +94,7 @@ def self.remake_stats_for(doc, voteable)
'votes.up_count' => up_count,
'votes.down_count' => down_count,
'votes.count' => up_count + down_count,
- 'votes.point' => voteable[:up]*up_count + voteable[:down]*down_count
+ 'votes.point' => voteable[:up].to_i*up_count + voteable[:down].to_i*down_count
)
end

0 comments on commit 9584f9f

Please sign in to comment.