Permalink
Browse files

Prefer newest data

  • Loading branch information...
1 parent 0d563d2 commit 99a5d0b66eebe056d76563892da559cc8833f149 @tiendung tiendung committed May 2, 2011
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/voteable_mongoid/voteable/tasks.rb
@@ -42,10 +42,10 @@ def self.migrate_old_votes_for(klass, voteable)
# count, point)
votes = doc['votes'] || doc['voteable'] || {}
- up_voter_ids = votes['u'] || votes['up'] ||
+ up_voter_ids = votes['up'] || votes['u'] ||
votes['up_voter_ids'] || doc['up_voter_ids'] || []
- down_voter_ids = votes['d'] || votes['down'] ||
+ down_voter_ids = votes['down'] || votes['d'] ||
votes['down_voter_ids'] || doc['down_voter_ids'] || []
up_count = up_voter_ids.size

0 comments on commit 99a5d0b

Please sign in to comment.